mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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>
This commit is contained in:
parent
576bf05aa9
commit
5f7727e1c9
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user