avcodec/adpcm: use assert for codec id instead or error return
authorMichael Niedermayer <michael@niedermayer.cc>
Mon, 31 Dec 2018 17:45:25 +0000 (18:45 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Tue, 1 Jan 2019 20:11:47 +0000 (21:11 +0100)
A unsupported codec_id is a internal error and should not happen

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/adpcm.c

index cd3bbd3..aa9c7c5 100644 (file)
@@ -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) {