aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMichael Niedermayer2017-01-29 03:22:50 +0100
committerMichael Niedermayer2017-01-29 16:09:55 +0100
commitbbd4d9230407d70a9c93af4ac00f2e6d894358be (patch)
treea0c6895ac0178ab28e8ef8e6a216cdddd1dda6a4 /doc
parentc6f7f33eec8e62e35c8650fe12721278b9ef2e9e (diff)
doc/examples/decoder_targeted: Disable error concealment after 20 frames
This allows testing EC and non EC. Avoids spending most time in EC on high res samples and reduces the likelyhood of hitting timeouts Fixes: Timeout in 467/fuzz-2-ffmpeg_VIDEO_AV_CODEC_ID_H263_fuzzer Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/decoder_targeted.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/examples/decoder_targeted.c b/doc/examples/decoder_targeted.c
index e7e02b027e..030eba6227 100644
--- a/doc/examples/decoder_targeted.c
+++ b/doc/examples/decoder_targeted.c
@@ -180,6 +180,10 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
while (avpkt.size > 0 && it++ < maxiteration) {
av_frame_unref(frame);
int ret = decode_handler(ctx, frame, &got_frame, &avpkt);
+
+ if (it > 20)
+ ctx->error_concealment = 0;
+
if (ret <= 0 || ret > avpkt.size)
break;
avpkt.data += ret;