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

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

commit 43699be2062726807f297aee0fde592e9f934778
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Thu Apr 30 14:52:15 2026 +0200
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Mon May 4 15:57:29 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 5eb2855065..c7dc429aea 100644
--- a/libavcodec/h264_refs.c
+++ b/libavcodec/h264_refs.c
@@ -156,8 +156,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;
         }
 
@@ -178,8 +177,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 (int 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