[FFmpeg-cvslog] avcodec/pcm: Use av_unreachable() for unreachable code

Andreas Rheinhardt git at videolan.org
Mon May 26 04:53:07 EEST 2025


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Wed May 21 12:55:48 2025 +0200| [7ae20272b79ea04d690798b5386ba00620011a0a] | committer: Andreas Rheinhardt

avcodec/pcm: 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=7ae20272b79ea04d690798b5386ba00620011a0a
---

 libavcodec/pcm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c
index bff61f2195..68b1945194 100644
--- a/libavcodec/pcm.c
+++ b/libavcodec/pcm.c
@@ -327,6 +327,8 @@ static av_cold av_unused int pcm_lut_decode_init(AVCodecContext *avctx)
     PCMLUTDecode *s = avctx->priv_data;
 
     switch (avctx->codec_id) {
+    default:
+        av_unreachable("pcm_lut_decode_init() only used with alaw, mulaw and vidc");
     case AV_CODEC_ID_PCM_ALAW:
         for (int i = 0; i < 256; i++)
             s->table[i] = alaw2linear(i);



More information about the ffmpeg-cvslog mailing list