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

Git pushed a commit to branch master
in repository ffmpeg.

commit 46f327624835a97a9c838b103b4e75b47a2d34f0
Author:     Kacper Michajłow <[email protected]>
AuthorDate: Thu Jul 30 17:29:04 2026 +0200
Commit:     Kacper Michajłow <[email protected]>
CommitDate: Wed Aug 26 00:41:35 2026 +0000

    avcodec/h264_slice: clear the ER picture when starting a second field
    
    h264_frame_start() clears h->er.cur_pic, and decode_nal_units() only sets
    it again for pictures that are not field coded, right before running error
    concealment. A second field goes through neither, so h->er.cur_pic keeps
    pointing at whatever frame coded picture the context decoded earlier.
    
    With frame threading the two fields of a pair are decoded by different
    contexts, so whether this triggers depends on what the context that picks
    up the second field decoded before, which is why the number of bogus
    warnings varies between runs.
    
    Signed-off-by: Kacper Michajłow <[email protected]>
---
 libavcodec/h264_slice.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 9b5ed8f77e..a13047ffe8 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -1627,6 +1627,10 @@ static int h264_field_start(H264Context *h, const 
H264SliceContext *sl,
         int field = h->picture_structure == PICT_BOTTOM_FIELD;
         release_unused_pictures(h, 0);
         h->cur_pic_ptr->tf.owner[field] = h->avctx;
+        /* h264_frame_start(), which clears this for every other picture, is
+         * not called for a second field. */
+        if (CONFIG_ERROR_RESILIENCE)
+            ff_h264_set_erpic(&h->er.cur_pic, NULL);
     }
     /* Some macroblocks can be accessed before they're available in case
     * of lost slices, MBAFF or threading. */

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to