diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-12-29 22:09:35 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-01-22 21:50:49 +0100 |
commit | 5f7727e1c9c33c26cc5caf06bfe83a96d2c107da (patch) | |
tree | 8a30be6ebd4850206530d2f635ceca1358280ae3 /tools | |
parent | 576bf05aa9e4d1ff682ec2513d3d5635f7ec5fb8 (diff) | |
download | ffmpeg-5f7727e1c9c33c26cc5caf06bfe83a96d2c107da.tar.gz |
tools/target_dec_fuzzer: Use codec_tags list
This should make it much quicker for the fuzzer to test
real relevant codec_tags
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/target_dec_fuzzer.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c index 9f342ebde9..a3d784a019 100644 --- a/tools/target_dec_fuzzer.c +++ b/tools/target_dec_fuzzer.c @@ -213,6 +213,11 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { ctx->channels = (unsigned)bytestream2_get_le32(&gbc) % FF_SANE_NB_CHANNELS; ctx->block_align = bytestream2_get_le32(&gbc) & 0x7FFFFFFF; ctx->codec_tag = bytestream2_get_le32(&gbc); + if (c->codec_tags) { + int n; + for (n = 0; c->codec_tags[n] != FF_CODEC_TAGS_END; n++); + ctx->codec_tag = c->codec_tags[ctx->codec_tag % n]; + } keyframes = bytestream2_get_le64(&gbc); ctx->request_channel_layout = bytestream2_get_le64(&gbc); |