aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-02-07 13:59:15 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2020-06-08 20:45:56 +0200
commit3371d0611fcd31e0bc72553d88774512a58bd2ef (patch)
treee3b85d231842e6457b6bee1d25c28e14cc7eade2
parentb7e5c8f67d82550daacce58fae97e1fe3d3fb9aa (diff)
downloadffmpeg-3371d0611fcd31e0bc72553d88774512a58bd2ef.tar.gz
tools/target_dec_fuzzer: enable mjpeg for tiff or tdsc
This is needed for fuzzing tiff/tdsc and should increase coverage Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/allcodecs.c1
-rw-r--r--tools/target_dec_fuzzer.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index 5240d0afdf..80f128cade 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -813,6 +813,7 @@ extern AVCodec ff_vp9_qsv_encoder;
#if CONFIG_OSSFUZZ
AVCodec * codec_list[] = {
NULL,
+ NULL,
NULL
};
#else
diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c
index d01deaf8d5..66ee99a91d 100644
--- a/tools/target_dec_fuzzer.c
+++ b/tools/target_dec_fuzzer.c
@@ -120,6 +120,12 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
codec_list[0] = &DECODER_SYMBOL(FFMPEG_DECODER);
avcodec_register(&DECODER_SYMBOL(FFMPEG_DECODER));
+#if FFMPEG_DECODER == tiff || FFMPEG_DECODER == tdsc
+ extern AVCodec DECODER_SYMBOL(mjpeg);
+ codec_list[1] = &DECODER_SYMBOL(mjpeg);
+ avcodec_register(&DECODER_SYMBOL(mjpeg));
+#endif
+
c = &DECODER_SYMBOL(FFMPEG_DECODER);
#else
avcodec_register_all();