lavfi/asplit: fix memleak
authorStefano Sabatini <stefasab@gmail.com>
Fri, 15 Jun 2012 14:40:33 +0000 (16:40 +0200)
committerStefano Sabatini <stefasab@gmail.com>
Wed, 20 Jun 2012 10:37:50 +0000 (12:37 +0200)
The input samples buffer must be unreferenced after it is propagated to
the output links.

libavfilter/split.c

index 13669c1..13d26d4 100644 (file)
@@ -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 = {