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

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

commit 8dc6b82a7ad01bece59477403623b0a502fd5217
Author:     Baptiste Coudurier <[email protected]>
AuthorDate: Tue Nov 17 15:17:51 2026 -0800
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Thu Nov 19 14:55:53 2026 +0100

    avcodec/h264_picture: fix film grain fallback with frame threads
    
    Other threads already hold needs_fg, so copy the decoded picture into 
f_grain instead.
    
    Fixes: #25691
    Regression since: 66845cffc3
    
    Signed-off-by: Baptiste Coudurier <[email protected]>
    (cherry picked from commit 3a78197c4c969e7a493956733b340b68dcdb7fa0)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/h264_picture.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavcodec/h264_picture.c b/libavcodec/h264_picture.c
index 8cb91e371c..3eeca52381 100644
--- a/libavcodec/h264_picture.c
+++ b/libavcodec/h264_picture.c
@@ -220,8 +220,9 @@ int ff_h264_field_end(H264Context *h, H264SliceContext *sl, 
int in_setup)
         if (err < 0) {
             av_log(h->avctx, AV_LOG_WARNING, "Failed synthesizing film "
                    "grain, ignoring: %s\n", av_err2str(err));
-            cur->needs_fg = 0;
-            err = 0;
+            /* other threads may already hold a reference with needs_fg set,
+             * so output the decoded picture through the grain buffer */
+            err = av_frame_copy(cur->f_grain, cur->f);
         }
     }
 

-- 
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