From 0798f58abeddef358612db8c84674ba3380f9291 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Sun, 3 Aug 2025 15:45:32 +0200 Subject: [PATCH] avcodec/mpeg4videodec: add av_unreachable for unexpected startcode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: mpeg4videodec.c:3679:22: warning: variable 'name' is used uninitialized whenever 'if' condition is false Signed-off-by: Kacper Michajłow --- libavcodec/mpeg4videodec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index bc2c92672a..f3d138387b 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -3678,6 +3678,8 @@ int ff_mpeg4_parse_picture_header(Mpeg4DecContext *ctx, GetBitContext *gb, name = "Reserved"; else if (startcode <= 0x1FF) name = "System start"; + else + av_unreachable("Unexpected startcode"); av_log(s->avctx, AV_LOG_DEBUG, "startcode: %3X %s at %d\n", startcode, name, get_bits_count(gb)); }