lavfi: take_samples: free frames after taking all samples.
authorNicolas George <george@nsup.org>
Thu, 22 Dec 2016 09:26:03 +0000 (10:26 +0100)
committerNicolas George <george@nsup.org>
Thu, 22 Dec 2016 09:35:48 +0000 (10:35 +0100)
libavfilter/avfilter.c

index c2a8413..0020ee1 100644 (file)
@@ -1288,6 +1288,7 @@ static int take_samples(AVFilterLink *link, unsigned min, unsigned max,
         av_samples_copy(buf->extended_data, frame->extended_data, p, 0,
                         frame->nb_samples, link->channels, link->format);
         p += frame->nb_samples;
+        av_frame_free(&frame);
     }
     if (p < nb_samples) {
         unsigned n = nb_samples - p;