Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-10-03 00:08:14 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2021-11-29 19:15:07 +0300
commit76c41a5bfeceb6d4a5c656abe41791f08c3b011c (patch)
tree28efe5f98dbe6fdd0fa4f3859dc8128204837a03 /tools
parent3a64a4c58255d45e05eff80c9464ad3bdc2d6463 (diff)
tools/target_dec_fuzzer: Disable MB debug after a few iterations
This debug code can be quite slow on constructed streams Fixes: Timeout Fixes: 38907/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-6334628852531200 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'tools')
-rw-r--r--tools/target_dec_fuzzer.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c
index 1a790f6642..15466a76d5 100644
--- a/tools/target_dec_fuzzer.c
+++ b/tools/target_dec_fuzzer.c
@@ -392,8 +392,10 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
decode_more = ret >= 0;
if(!decode_more) {
ec_pixels += (ctx->width + 32LL) * (ctx->height + 32LL);
- if (it > 20 || ec_pixels > 4 * ctx->max_pixels)
+ if (it > 20 || ec_pixels > 4 * ctx->max_pixels) {
ctx->error_concealment = 0;
+ ctx->debug &= ~(FF_DEBUG_SKIP | FF_DEBUG_QP | FF_DEBUG_MB_TYPE);
+ }
if (ec_pixels > maxpixels)
goto maximums_reached;
}
@@ -406,8 +408,10 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
int ret = decode_handler(ctx, frame, &got_frame, avpkt);
ec_pixels += (ctx->width + 32LL) * (ctx->height + 32LL);
- if (it > 20 || ec_pixels > 4 * ctx->max_pixels)
+ if (it > 20 || ec_pixels > 4 * ctx->max_pixels) {
ctx->error_concealment = 0;
+ ctx->debug &= ~(FF_DEBUG_SKIP | FF_DEBUG_QP | FF_DEBUG_MB_TYPE);
+ }
if (ec_pixels > maxpixels)
goto maximums_reached;