[FFmpeg-cvslog] lavfi/astreamsync: fix eval memleak.

Clément Bœsch git at videolan.org
Thu Apr 11 15:09:47 CEST 2013


ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Thu Apr 11 14:58:13 2013 +0200| [2fb8ca7d2c272d4246a87736030861a13064bb0d] | committer: Clément Bœsch

lavfi/astreamsync: fix eval memleak.

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

 libavfilter/af_astreamsync.c |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/libavfilter/af_astreamsync.c b/libavfilter/af_astreamsync.c
index 79f703a..76a152c 100644
--- a/libavfilter/af_astreamsync.c
+++ b/libavfilter/af_astreamsync.c
@@ -180,6 +180,14 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
     return 0;
 }
 
+static av_cold void uninit(AVFilterContext *ctx)
+{
+    AStreamSyncContext *as = ctx->priv;
+
+    av_expr_free(as->expr);
+    as->expr = NULL;
+}
+
 static const AVFilterPad astreamsync_inputs[] = {
     {
         .name         = "in1",
@@ -214,6 +222,7 @@ AVFilter avfilter_af_astreamsync = {
                                           "in a configurable order."),
     .priv_size     = sizeof(AStreamSyncContext),
     .init          = init,
+    .uninit        = uninit,
     .query_formats = query_formats,
     .inputs        = astreamsync_inputs,
     .outputs       = astreamsync_outputs,



More information about the ffmpeg-cvslog mailing list