[FFmpeg-devel] [PATCH 2/5] avcodec/encode: Simplify pixel format validity check
Andreas Rheinhardt
ffmpegagent at gmail.com
Fri Jul 11 21:00:03 EEST 2025
From: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
libavcodec/encode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/encode.c b/libavcodec/encode.c
index 38833c566c..b9782a0581 100644
--- a/libavcodec/encode.c
+++ b/libavcodec/encode.c
@@ -551,7 +551,7 @@ static int encode_preinit_video(AVCodecContext *avctx)
const enum AVPixelFormat *pix_fmts;
int ret, i, num_pix_fmts;
- if (!av_get_pix_fmt_name(avctx->pix_fmt)) {
+ if (!pixdesc) {
av_log(avctx, AV_LOG_ERROR, "Invalid video pixel format: %d\n",
avctx->pix_fmt);
return AVERROR(EINVAL);
--
ffmpeg-codebot
More information about the ffmpeg-devel
mailing list