[FFmpeg-devel] [PATCH 3/5] avcodec/encode: Ignore coded_{width, height}

Andreas Rheinhardt ffmpegagent at gmail.com
Fri Jul 11 21:00:04 EEST 2025


From: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

It is supposed to be unused by encoders.

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

diff --git a/libavcodec/encode.c b/libavcodec/encode.c
index b9782a0581..0308c73630 100644
--- a/libavcodec/encode.c
+++ b/libavcodec/encode.c
@@ -818,8 +818,8 @@ int ff_encode_alloc_frame(AVCodecContext *avctx, AVFrame *frame)
     case AVMEDIA_TYPE_VIDEO:
         frame->format = avctx->pix_fmt;
         if (frame->width <= 0 || frame->height <= 0) {
-            frame->width  = FFMAX(avctx->width,  avctx->coded_width);
-            frame->height = FFMAX(avctx->height, avctx->coded_height);
+            frame->width  = avctx->width;
+            frame->height = avctx->height;
         }
 
         break;
-- 
ffmpeg-codebot



More information about the ffmpeg-devel mailing list