diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-29 03:37:43 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-29 03:40:47 +0200 |
commit | 718f8a01dfa301b2d21eefcd61bdd1988953d0aa (patch) | |
tree | 1e0d3df32d5c658d63fa2cccf96b20d6ae23f1bb /tools | |
parent | f6ba58d193d965df388224b1b18a6066ee9b4eea (diff) | |
download | ffmpeg-718f8a01dfa301b2d21eefcd61bdd1988953d0aa.tar.gz |
tools/target_dec_fuzzer: Move the hwaccel check outside the initialization if
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/target_dec_fuzzer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c index ed6e2429b1..ec10480c0a 100644 --- a/tools/target_dec_fuzzer.c +++ b/tools/target_dec_fuzzer.c @@ -147,10 +147,6 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { avcodec_register(&DECODER_SYMBOL(FFMPEG_DECODER)); c = &DECODER_SYMBOL(FFMPEG_DECODER); - - // Unsupported - if (c->capabilities & AV_CODEC_CAP_HWACCEL_VDPAU) - return 0; #else avcodec_register_all(); c = AVCodecInitialize(FFMPEG_CODEC); // Done once. @@ -158,6 +154,10 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { av_log_set_level(AV_LOG_PANIC); } + // Unsupported + if (c->capabilities & AV_CODEC_CAP_HWACCEL_VDPAU) + return 0; + switch (c->type) { case AVMEDIA_TYPE_AUDIO : decode_handler = avcodec_decode_audio4; break; case AVMEDIA_TYPE_VIDEO : decode_handler = avcodec_decode_video2; break; |