[FFmpeg-devel] [PATCH 1/4] avfilter/vf_colormap: Properly uninit FFFrameSync, fix leak

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Fri Apr 29 04:53:33 EEST 2022


Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavfilter/vf_colormap.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/libavfilter/vf_colormap.c b/libavfilter/vf_colormap.c
index 1e82514ade..9edc89f105 100644
--- a/libavfilter/vf_colormap.c
+++ b/libavfilter/vf_colormap.c
@@ -537,6 +537,13 @@ static int activate(AVFilterContext *ctx)
     return ff_framesync_activate(&s->fs);
 }
 
+static av_cold void uninit(AVFilterContext *ctx)
+{
+    ColorMapContext *const s = ctx->priv;
+
+    ff_framesync_uninit(&s->fs);
+}
+
 static const AVFilterPad inputs[] = {
     {
         .name = "default",
@@ -574,4 +581,5 @@ const AVFilter ff_vf_colormap = {
     .flags         = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL |
                      AVFILTER_FLAG_SLICE_THREADS,
     .process_command = ff_filter_process_command,
+    .uninit        = uninit,
 };
-- 
2.32.0



More information about the ffmpeg-devel mailing list