diff mbox

[FFmpeg-devel,2/5] avcodec/8svx: Use av_assert1(0) instead of error message in unreachable code

Message ID 20191229192339.5809-2-michael@niedermayer.cc
State New
Headers show

Commit Message

Michael Niedermayer Dec. 29, 2019, 7:23 p.m. UTC
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavcodec/8svx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Michael Niedermayer Feb. 2, 2020, 10:51 p.m. UTC | #1
On Sun, Dec 29, 2019 at 08:23:36PM +0100, Michael Niedermayer wrote:
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  libavcodec/8svx.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

will apply

[...]
diff mbox

Patch

diff --git a/libavcodec/8svx.c b/libavcodec/8svx.c
index edc945c697..092dbaae04 100644
--- a/libavcodec/8svx.c
+++ b/libavcodec/8svx.c
@@ -164,8 +164,7 @@  static av_cold int eightsvx_decode_init(AVCodecContext *avctx)
     case AV_CODEC_ID_8SVX_FIB: esc->table = fibonacci;    break;
     case AV_CODEC_ID_8SVX_EXP: esc->table = exponential;  break;
     default:
-        av_log(avctx, AV_LOG_ERROR, "Invalid codec id %d.\n", avctx->codec->id);
-        return AVERROR_INVALIDDATA;
+        av_assert1(0);
     }
     avctx->sample_fmt = AV_SAMPLE_FMT_U8P;