[FFmpeg-cvslog] avcodec/mpeg4videodec: Mark impossible switch case as unreachable
Andreas Rheinhardt
git at videolan.org
Wed May 21 13:47:33 EEST 2025
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sun Oct 3 14:35:31 2021 +0200| [7a27357636ffc8e227b9c6f2bdade973ec4c3829] | committer: Andreas Rheinhardt
avcodec/mpeg4videodec: Mark impossible switch case as unreachable
Alternative to 8fc649b931a3cbc3a2dd9b50b75a9261a2fb4b49.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7a27357636ffc8e227b9c6f2bdade973ec4c3829
---
libavcodec/mpeg4videodec.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index d5979096ae..b6bb21174e 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -24,6 +24,7 @@
#include "config_components.h"
+#include "libavutil/avassert.h"
#include "libavutil/internal.h"
#include "libavutil/opt.h"
#include "libavutil/thread.h"
@@ -605,7 +606,8 @@ static int mpeg4_decode_sprite_trajectory(Mpeg4DecContext *ctx, GetBitContext *g
ctx->sprite_shift[1] = alpha + beta + rho - min_ab + 2;
break;
default:
- av_assert0(0);
+ av_unreachable("num_sprite_warping_points outside of 0..3 results in an error"
+ "in which num_sprite_warping_points is reset to zero");
}
/* try to simplify the situation */
if (sprite_delta[0][0] == a << ctx->sprite_shift[0] &&
More information about the ffmpeg-cvslog
mailing list