[FFmpeg-cvslog] avfilter/vf_scale: properly reinitialize framesync

James Almer git at videolan.org
Mon May 6 03:37:31 EEST 2024


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Sun May  5 11:39:49 2024 -0300| [82397084a9328d3f67caa9ce519304b714a132ea] | committer: James Almer

avfilter/vf_scale: properly reinitialize framesync

Fixes leaks as reported by ASAN and Valgrind.

Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=82397084a9328d3f67caa9ce519304b714a132ea
---

 libavfilter/vf_scale.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c
index 07e9025335..841075193e 100644
--- a/libavfilter/vf_scale.c
+++ b/libavfilter/vf_scale.c
@@ -766,6 +766,7 @@ static int config_props(AVFilterLink *outlink)
     av_freep(&flags_val);
 
     if (ctx->filter != &ff_vf_scale2ref) {
+        ff_framesync_uninit(&scale->fs);
         ret = ff_framesync_init(&scale->fs, ctx, ctx->nb_inputs);
         if (ret < 0)
             return ret;



More information about the ffmpeg-cvslog mailing list