[FFmpeg-cvslog] avcodec/msmpeg4dec: Use av_unreachable() for unreachable code
Andreas Rheinhardt
git at videolan.org
Mon May 26 04:53:01 EEST 2025
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Fri May 16 18:24:38 2025 +0200| [ded08d0b1bb46bee50fafd4d12c5e9af16f10718] | committer: Andreas Rheinhardt
avcodec/msmpeg4dec: Use av_unreachable() for unreachable code
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ded08d0b1bb46bee50fafd4d12c5e9af16f10718
---
libavcodec/msmpeg4dec.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libavcodec/msmpeg4dec.c b/libavcodec/msmpeg4dec.c
index df67d43542..ddb990b1a0 100644
--- a/libavcodec/msmpeg4dec.c
+++ b/libavcodec/msmpeg4dec.c
@@ -379,6 +379,8 @@ av_cold int ff_msmpeg4_decode_init(AVCodecContext *avctx)
break;
case MSMP4_WMV2:
break;
+ default:
+ av_unreachable("List contains all cases using ff_msmpeg4_decode_init()");
}
s->slice_height= s->mb_height; //to avoid 1/0 if the first frame is not a keyframe
@@ -472,6 +474,8 @@ int ff_msmpeg4_decode_picture_header(MpegEncContext * s)
ms->dc_table_index = get_bits1(&s->gb);
s->inter_intra_pred= 0;
break;
+ default:
+ av_unreachable("ff_msmpeg4_decode_picture_header() only used by MSMP4V1-3, WMV1");
}
s->no_rounding = 1;
if(s->avctx->debug&FF_DEBUG_PICT_INFO)
@@ -523,6 +527,8 @@ int ff_msmpeg4_decode_picture_header(MpegEncContext * s)
s->inter_intra_pred = s->width*s->height < 320*240 &&
ms->bit_rate <= II_BITRATE;
break;
+ default:
+ av_unreachable("ff_msmpeg4_decode_picture_header() only used by MSMP4V1-3, WMV1");
}
if(s->avctx->debug&FF_DEBUG_PICT_INFO)
More information about the ffmpeg-cvslog
mailing list