[FFmpeg-cvslog] avfilter/vf_weave: do not leak unused frame

Paul B Mahol git at videolan.org
Fri Sep 9 13:00:16 EEST 2016


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Sep  9 11:58:18 2016 +0200| [653ca058079ccf65f487abd5f30f479903ec82ac] | committer: Paul B Mahol

avfilter/vf_weave: do not leak unused frame

Signed-off-by: Paul B Mahol <onemda at gmail.com>

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

 libavfilter/vf_weave.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/libavfilter/vf_weave.c b/libavfilter/vf_weave.c
index 2f0784e..a5fc1b7 100644
--- a/libavfilter/vf_weave.c
+++ b/libavfilter/vf_weave.c
@@ -115,6 +115,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
     return ff_filter_frame(outlink, out);
 }
 
+static av_cold void uninit(AVFilterContext *ctx)
+{
+    WeaveContext *s = ctx->priv;
+
+    av_frame_free(&s->prev);
+}
+
 static const AVFilterPad weave_inputs[] = {
     {
         .name             = "default",
@@ -138,6 +145,7 @@ AVFilter ff_vf_weave = {
     .description   = NULL_IF_CONFIG_SMALL("Weave input video fields into frames."),
     .priv_size     = sizeof(WeaveContext),
     .priv_class    = &weave_class,
+    .uninit        = uninit,
     .inputs        = weave_inputs,
     .outputs       = weave_outputs,
 };



More information about the ffmpeg-cvslog mailing list