From c2918eb88ecb93764809bd158cddbb8d73f89db8 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 5 May 2024 03:08:48 +0200 Subject: [PATCH] tools/target_enc_fuzzer: replace assert by clean exit Signed-off-by: Michael Niedermayer --- 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 4357d37636..1749f6905b 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;