[FFmpeg-devel] [PATCH 11/47] avcodec/mpegvideo_enc: Remove always-true branch

Andreas Rheinhardt ffmpegagent at gmail.com
Sun Jun 15 19:54:02 EEST 2025


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

Always-true since 1c40a179222f638e88c8e7b1a374753a00b0f979
which made 4863671d888273392e9dcc2429f3852c00330498 superfluous.

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

diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 46901fc506..af1e77cfec 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1824,10 +1824,8 @@ static int select_input_picture(MPVMainEncContext *const m)
             ret = av_frame_ref(s->new_pic, m->reordered_input_picture[0]->f);
             if (ret < 0)
                 goto fail;
-            for (int i = 0; i < MPV_MAX_PLANES; i++) {
-                if (s->new_pic->data[i])
-                    s->new_pic->data[i] += INPLACE_OFFSET;
-            }
+            for (int i = 0; i < MPV_MAX_PLANES; i++)
+                s->new_pic->data[i] += INPLACE_OFFSET;
         }
         s->c.cur_pic.ptr = m->reordered_input_picture[0];
         m->reordered_input_picture[0] = NULL;
-- 
ffmpeg-codebot



More information about the ffmpeg-devel mailing list