[FFmpeg-devel] [PATCH] tools/target_dec_fuzzer: Set bits_per_raw_sample for ARGO

Michael Niedermayer michael at niedermayer.cc
Sat Jul 17 12:09:01 EEST 2021


This may improve coverage of argo

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 tools/target_dec_fuzzer.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c
index 3d06630e46..3963eb1d2a 100644
--- a/tools/target_dec_fuzzer.c
+++ b/tools/target_dec_fuzzer.c
@@ -282,6 +282,9 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
                 av_dict_set_int(&opts, "target_level",  (int)(bytestream2_get_byte(&gbc) % 32) - 31, 0);
                 av_dict_set_int(&opts, "dmix_mode",     (int)(bytestream2_get_byte(&gbc) %  4) -  1, 0);
                 break;
+            case AV_CODEC_ID_ARGO:
+                ctx->bits_per_raw_sample= bytestream2_get_byte(&gbc); // This is a violation of the API but used by the argo demuxer - decoder interface
+                break;
             }
         }
 
-- 
2.17.1



More information about the ffmpeg-devel mailing list