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

Git pushed a commit to branch master
in repository ffmpeg.

The following commit(s) were added to refs/heads/master by this push:
     new 151814650f avfilter/vf_gainmap: do not take ownership of the base frame
151814650f is described below

commit 151814650ff8534352dcaedd7a595f7c2dc0afeb
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Fri Oct 2 03:12:32 2026 +0200
Commit:     Niklas Haas <[email protected]>
CommitDate: Tue Oct 6 09:38:44 2026 +0000

    avfilter/vf_gainmap: do not take ownership of the base frame
    
    Found by running FATE with LeakSanitizer
    Fixes: memleak
    Fixes: fate-filter-gainmap, fate-filter-gainmap-luma, 
fate-filter-gainmap-maxrgb, fate-filter-gainmap-fixed, fate-jpeg-mpf-gainmap 
with AddressSanitizer
---
 libavfilter/vf_gainmap.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavfilter/vf_gainmap.c b/libavfilter/vf_gainmap.c
index 866fef53a6..98ea8b9177 100644
--- a/libavfilter/vf_gainmap.c
+++ b/libavfilter/vf_gainmap.c
@@ -623,8 +623,9 @@ static int process_frame(FFFrameSync *fs)
     AVFilterLink *outlink = ctx->outputs[0];
     AVFrame *base, *alt, *out;
 
-    int ret = ff_framesync_dualinput_get(fs, &base, &alt);
-    if (ret < 0)
+    int ret;
+    if ((ret = ff_framesync_get_frame(fs, 0, &base, 0)) < 0 ||
+        (ret = ff_framesync_get_frame(fs, 1, &alt,  0)) < 0)
         return ret;
     if (!base || !alt)
         return AVERROR_BUG;
@@ -637,6 +638,7 @@ static int process_frame(FFFrameSync *fs)
     if (!out)
         return AVERROR(ENOMEM);
     av_frame_copy_props(out, base);
+    out->pts = av_rescale_q(fs->pts, fs->time_base, outlink->time_base);
     av_frame_side_data_remove_by_props(&out->side_data, &out->nb_side_data,
                                        AV_SIDE_DATA_PROP_COLOR_DEPENDENT);
 

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