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

Git pushed a commit to branch master
in repository ffmpeg.

commit 2bfdd2a0a6e810a18c1913916e4b7cac50934e79
Author:     Baptiste Coudurier <[email protected]>
AuthorDate: Tue Nov 17 15:17:51 2026 -0800
Commit:     Baptiste Coudurier <[email protected]>
CommitDate: Wed Nov 18 07:05:10 2026 +0000

    avcodec/h264dec: do not duplicate side data when outputting f_grain
    
    f_grain gets its own side data on allocation, which av_frame_copy_props() 
appended to.
    
    Signed-off-by: Baptiste Coudurier <[email protected]>
---
 libavcodec/h264dec.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c
index fea2e2a616..b2ff1241c9 100644
--- a/libavcodec/h264dec.c
+++ b/libavcodec/h264dec.c
@@ -947,8 +947,13 @@ static int output_frame(H264Context *h, AVFrame *dst, 
H264Picture *srcp)
     if (ret < 0)
         return ret;
 
-    if (srcp->needs_fg && (ret = av_frame_copy_props(dst, srcp->f)) < 0)
-        return ret;
+    if (srcp->needs_fg) {
+        /* f_grain got its own copy of the side data on allocation */
+        av_frame_side_data_free(&dst->side_data, &dst->nb_side_data);
+        ret = av_frame_copy_props(dst, srcp->f);
+        if (ret < 0)
+            return ret;
+    }
 
     if (srcp->decode_error_flags) {
         atomic_int *decode_error = srcp->decode_error_flags;

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