[FFmpeg-cvslog] avcodec/adpcm: use assert for codec id instead or error return
Michael Niedermayer
git at videolan.org
Wed Jan 2 01:23:58 EET 2019
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Mon Dec 31 18:45:25 2018 +0100| [2d9fe6321e320f9cef2a767af30a7b5b2f65d799] | committer: Michael Niedermayer
avcodec/adpcm: use assert for codec id instead or error return
A unsupported codec_id is a internal error and should not happen
Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2d9fe6321e320f9cef2a767af30a7b5b2f65d799
---
libavcodec/adpcm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
index cd3bbd33c2..aa9c7c5c4f 100644
--- a/libavcodec/adpcm.c
+++ b/libavcodec/adpcm.c
@@ -1679,7 +1679,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
break;
default:
- return -1;
+ av_assert0(0); // unsupported codec_id should not happen
}
if (avpkt->size && bytestream2_tell(&gb) == 0) {
More information about the ffmpeg-cvslog
mailing list