From 595ea69554f46aee7924c0fe89d6bf344cc4bf38 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Sun, 3 Oct 2021 15:32:18 +0200 Subject: [PATCH 07/21] avcodec/utvideoenc: Remove always-false pixel format check Mark it as unreachable instead. Signed-off-by: Andreas Rheinhardt --- libavcodec/utvideoenc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavcodec/utvideoenc.c b/libavcodec/utvideoenc.c index be503d78c6..e35f0a82f4 100644 --- a/libavcodec/utvideoenc.c +++ b/libavcodec/utvideoenc.c @@ -24,6 +24,7 @@ * Ut Video encoder */ +#include "libavutil/avassert.h" #include "libavutil/imgutils.h" #include "libavutil/intreadwrite.h" #include "libavutil/mem.h" @@ -143,9 +144,7 @@ static av_cold int utvideo_encode_init(AVCodecContext *avctx) original_format = UTVIDEO_444; break; default: - av_log(avctx, AV_LOG_ERROR, "Unknown pixel format: %d\n", - avctx->pix_fmt); - return AVERROR_INVALIDDATA; + av_unreachable("Already checked via AVCodec.pix_fmts"); } ff_bswapdsp_init(&c->bdsp); -- 2.45.2