This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit afdb683a3fcfb2399141faa5050ec6755ba9c5fe
Author:     Niklas Haas <[email protected]>
AuthorDate: Sat Feb 21 15:27:00 2026 +0100
Commit:     Niklas Haas <[email protected]>
CommitDate: Mon Feb 23 19:39:17 2026 +0000

    swscale: avoid UB on interlaced frames
    
    NULL+0 is UB.
    
    Signed-off-by: Niklas Haas <[email protected]>
---
 libswscale/swscale.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 4ae0f25b9d..0e1831800c 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -1336,7 +1336,8 @@ static SwsImg get_frame_img(const AVFrame *frame, int 
field)
         /* Odd rows, offset by one line */
         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format);
         for (int i = 0; i < 4; i++) {
-            img.data[i] += img.linesize[i];
+            if (img.data[i])
+                img.data[i] += img.linesize[i];
             if (desc->flags & AV_PIX_FMT_FLAG_PAL)
                 break;
         }

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to