[FFmpeg-cvslog] lavfi/asplit: fix memleak

Stefano Sabatini git at videolan.org
Wed Jun 20 12:38:24 CEST 2012


ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Fri Jun 15 16:40:33 2012 +0200| [93bbe53c441ef3b6e3d92023f4dc99b34e47135b] | committer: Stefano Sabatini

lavfi/asplit: fix memleak

The input samples buffer must be unreferenced after it is propagated to
the output links.

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

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

diff --git a/libavfilter/split.c b/libavfilter/split.c
index 13669c1..13d26d4 100644
--- a/libavfilter/split.c
+++ b/libavfilter/split.c
@@ -118,6 +118,7 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *samplesref)
     for (i = 0; i < ctx->nb_outputs; i++)
         ff_filter_samples(inlink->dst->outputs[i],
                           avfilter_ref_buffer(samplesref, ~AV_PERM_WRITE));
+    avfilter_unref_buffer(samplesref);
 }
 
 AVFilter avfilter_af_asplit = {



More information about the ffmpeg-cvslog mailing list