[FFmpeg-devel] [PATCH 08/12] avcodec/utvideoenc: Remove always-false pixel format check

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Sat May 25 01:04:51 EEST 2024


Mark it as unreachable instead.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavcodec/utvideoenc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/utvideoenc.c b/libavcodec/utvideoenc.c
index 59e198458b..f347a33e6e 100644
--- a/libavcodec/utvideoenc.c
+++ b/libavcodec/utvideoenc.c
@@ -143,9 +143,9 @@ 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;
+        /* Already checked via AVCodec.pix_fmts. */
+        av_unreachable;
+        break;
     }
 
     ff_bswapdsp_init(&c->bdsp);
-- 
2.40.1



More information about the ffmpeg-devel mailing list