[FFmpeg-devel] [PATCH] tools/target_dec_fuzzer: Limit error concealment to max_pixels

Michael Niedermayer michael at niedermayer.cc
Mon Nov 20 19:25:51 EET 2017


Error concealment is time consuming, limiting it in a pixel dependant way allows
the decoder to be fuzzed with more frames quicker

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 tools/target_dec_fuzzer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c
index 62d62a9de3..04f95561cc 100644
--- a/tools/target_dec_fuzzer.c
+++ b/tools/target_dec_fuzzer.c
@@ -211,7 +211,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
             av_frame_unref(frame);
             int ret = decode_handler(ctx, frame, &got_frame, &avpkt);
 
-            if (it > 20)
+            if (it > 20 || it * ctx->width * ctx->height > ctx->max_pixels)
                 ctx->error_concealment = 0;
 
             if (ret <= 0 || ret > avpkt.size)
-- 
2.15.0



More information about the ffmpeg-devel mailing list