diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-06 16:12:05 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-06 16:12:05 +0300 |
commit | d58fe0177453bfa43eca9e5174304025248908b2 (patch) | |
tree | 52799288fb5200e4d8f09b7bf649ae5fac11390c /tools/target_dec_fuzzer.c | |
parent | 4654baff125d937ae0b1037aa5f0bf53c7351658 (diff) |
tools/target_dec_fuzzer: Do not use codec_id to look up decoder, but use selected decoder directly
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'tools/target_dec_fuzzer.c')
-rw-r--r-- | tools/target_dec_fuzzer.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c index 5a0b53e546..d5ba99d78a 100644 --- a/tools/target_dec_fuzzer.c +++ b/tools/target_dec_fuzzer.c @@ -67,7 +67,6 @@ static AVCodec *AVCodecInitialize(enum AVCodecID codec_id) { AVCodec *res; - av_log_set_level(AV_LOG_PANIC); res = avcodec_find_decoder(codec_id); if (!res) error("Failed to find decoder"); @@ -146,13 +145,13 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { #define DECODER_SYMBOL(CODEC) DECODER_SYMBOL0(CODEC) extern AVCodec DECODER_SYMBOL(FFMPEG_DECODER); avcodec_register(&DECODER_SYMBOL(FFMPEG_DECODER)); - int codec_id = DECODER_SYMBOL(FFMPEG_DECODER).id; - c = AVCodecInitialize(codec_id); // Done once. + c = &DECODER_SYMBOL(FFMPEG_DECODER); #else avcodec_register_all(); c = AVCodecInitialize(FFMPEG_CODEC); // Done once. #endif + av_log_set_level(AV_LOG_PANIC); } switch (c->type) { |