[FFmpeg-devel] [PATCH 1/2] tools/target_enc_fuzzer: replace assert by clean exit

Michael Niedermayer michael at niedermayer.cc
Sun May 5 04:18:57 EEST 2024


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

diff --git a/tools/target_enc_fuzzer.c b/tools/target_enc_fuzzer.c
index 4357d376365..1749f6905bd 100644
--- a/tools/target_enc_fuzzer.c
+++ b/tools/target_enc_fuzzer.c
@@ -89,7 +89,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
         av_log_set_level(AV_LOG_PANIC);
     }
 
-    av_assert0(c->p.type == AVMEDIA_TYPE_VIDEO);
+    if (c->p.type != AVMEDIA_TYPE_VIDEO)
+        return 0;
 
     maxpixels = maxpixels_per_frame * maxiteration;
 
-- 
2.43.2



More information about the ffmpeg-devel mailing list