[FFmpeg-cvslog] lavfi: take_samples: free frames after taking all samples.

Nicolas George git at videolan.org
Thu Dec 22 11:46:07 EET 2016


ffmpeg | branch: master | Nicolas George <george at nsup.org> | Thu Dec 22 10:26:03 2016 +0100| [ff8b17c998dca3f0026466638430ed183426bdde] | committer: Nicolas George

lavfi: take_samples: free frames after taking all samples.

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

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

diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index c2a8413..0020ee1 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -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;



More information about the ffmpeg-cvslog mailing list