tools/target_dec_fuzzer: check max samples in flush loop

Fixes: Timeout
Fixes: 36020/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-4774629855068160

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
pull/364/head
Michael Niedermayer 3 years ago
parent e6754d2ad2
commit c42f277903
  1. 4
      tools/target_dec_fuzzer.c

@ -441,6 +441,10 @@ maximums_reached:
got_frame = 0;
av_frame_unref(frame);
decode_handler(ctx, frame, &got_frame, avpkt);
nb_samples += frame->nb_samples;
if (nb_samples > maxsamples)
break;
} while (got_frame == 1 && it++ < maxiteration);
fprintf(stderr, "pixels decoded: %"PRId64", samples decoded: %"PRId64", iterations: %d\n", ec_pixels, nb_samples, it);

Loading…
Cancel
Save