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

Git pushed a commit to branch release/5.1
in repository ffmpeg.

commit 527bc977f18b9dd0662e9302812a871aa62be20f
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Sun Jun 21 01:43:30 2026 +0200
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Sun Jun 21 02:56:27 2026 +0200

    avcodec/mpegvideo_dec: Fix lowres=3 field select interlaced mpeg4 frame
    
    Fixes: out of array read in the chroma plane
    Backported to 5.1's mpeg_motion_lowres() in mpegvideo.c.
    
    (cherry picked from commit e8a2d5fca3... adapted to 5.1 mpegvideo.c)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/mpegvideo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index c3c35ce966..91c1901de0 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1046,7 +1046,7 @@ static av_always_inline void 
mpeg_motion_lowres(MpegEncContext *s,
     ptr_cr = ref_picture[2] + uvsrc_y * uvlinesize + uvsrc_x;
 
     if ((unsigned) src_x > FFMAX( h_edge_pos - (!!sx) - 2 * block_s,       0) 
|| uvsrc_y<0 ||
-        (unsigned) src_y > FFMAX((v_edge_pos >> field_based) - (!!sy) - 
FFMAX(h, hc<<s->chroma_y_shift), 0)) {
+        (unsigned) src_y > FFMAX((v_edge_pos >> field_based) - (!!sy) - 
FFMAX(h, field_select + hc<<s->chroma_y_shift), 0)) {
         s->vdsp.emulated_edge_mc(s->sc.edge_emu_buffer, ptr_y,
                                  linesize >> field_based, linesize >> 
field_based,
                                  17, 17 + field_based,

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

Reply via email to