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 d9e30a50a6d6d34edd456b02eee25a2519608733
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Thu Apr 30 14:52:15 2026 +0200
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Tue May 5 15:21:18 2026 +0200

    avcodec/h264_refs: Clear stale pointers from ref_list
    
    Testcase: poc10.bin
    
    Reported-by: Dale Curtis <[email protected]>
    Signed-off-by: Michael Niedermayer <[email protected]>
    (cherry picked from commit 1886c3269d8a5cc15391ace1db598230d4fba5a4)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/h264_refs.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c
index 50bbe94917..4f73ad7e21 100644
--- a/libavcodec/h264_refs.c
+++ b/libavcodec/h264_refs.c
@@ -158,8 +158,7 @@ static void h264_initialise_ref_list(H264Context *h, 
H264SliceContext *sl)
                                   h->long_ref, 16, 1, h->picture_structure);
             av_assert0(len <= 32);
 
-            if (len < sl->ref_count[list])
-                memset(&sl->ref_list[list][len], 0, sizeof(H264Ref) * 
(sl->ref_count[list] - len));
+            memset(&sl->ref_list[list][len], 0, sizeof(H264Ref) * (32 - len));
             lens[list] = len;
         }
 
@@ -179,8 +178,7 @@ static void h264_initialise_ref_list(H264Context *h, 
H264SliceContext *sl)
                               h-> long_ref, 16, 1, h->picture_structure);
         av_assert0(len <= 32);
 
-        if (len < sl->ref_count[0])
-            memset(&sl->ref_list[0][len], 0, sizeof(H264Ref) * 
(sl->ref_count[0] - len));
+        memset(&sl->ref_list[0][len], 0, sizeof(H264Ref) * (32 - len));
     }
 #ifdef TRACE
     for (i = 0; i < sl->ref_count[0]; i++) {

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

Reply via email to