summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-09-25 22:33:43 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2020-10-18 21:27:23 +0200
commitc062dd74d7b12f661cd2ccde832bb27b990aee82 (patch)
tree77725b50df47475e104e6b963355f1ff63bc6f22 /tools
parentee33fecb62c6dabcfdb9199d7a5b8575b758f1d9 (diff)
tools/target_dec_fuzzer: Correct maxsamples_per_frame if maxsamples has been changed
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'tools')
-rw-r--r--tools/target_dec_fuzzer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c
index 7bea736fcf..db1c6d35a6 100644
--- a/tools/target_dec_fuzzer.c
+++ b/tools/target_dec_fuzzer.c
@@ -185,6 +185,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
case AV_CODEC_ID_ZEROCODEC: maxpixels /= 128; break;
}
+ maxsamples_per_frame = FFMIN(maxsamples_per_frame, maxsamples);
AVCodecContext* ctx = avcodec_alloc_context3(c);
AVCodecContext* parser_avctx = avcodec_alloc_context3(NULL);