diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-10-12 22:34:01 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-10-14 21:16:00 +0200 |
commit | 2d3ccfa86334c0bb74fffe564b5d684699274669 (patch) | |
tree | 23eec8845b3b3d5bcb510fd78072e6cd49587dc7 /tools | |
parent | 0c07eb52050b9a608608f9a4ad31f9a5cd4df97a (diff) | |
download | ffmpeg-streaming-2d3ccfa86334c0bb74fffe564b5d684699274669.zip ffmpeg-streaming-2d3ccfa86334c0bb74fffe564b5d684699274669.tar.gz |
tools/target_dec_fuzzer: Also fuzz FF_COMPLIANCE_EXPERIMENTAL
This should improve coverage
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/target_dec_fuzzer.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c index 99e89ab..8def3c9 100644 --- a/tools/target_dec_fuzzer.c +++ b/tools/target_dec_fuzzer.c @@ -171,6 +171,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { if (size > 1024) { GetByteContext gbc; int extradata_size; + int flags; size -= 1024; bytestream2_init(&gbc, data + size, 1024); ctx->width = bytestream2_get_le32(&gbc); @@ -178,8 +179,11 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { ctx->bit_rate = bytestream2_get_le64(&gbc); ctx->bits_per_coded_sample = bytestream2_get_le32(&gbc); // Try to initialize a parser for this codec, note, this may fail which just means we test without one - if (bytestream2_get_byte(&gbc) & 1) + flags = bytestream2_get_byte(&gbc); + if (flags & 1) parser = av_parser_init(c->id); + if (flags & 2) + ctx->strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL; extradata_size = bytestream2_get_le32(&gbc); |