summaryrefslogtreecommitdiff
path: root/libavfilter/vf_weave.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2016-09-09 11:58:18 +0200
committerPaul B Mahol <onemda@gmail.com>2016-09-09 11:58:18 +0200
commit653ca058079ccf65f487abd5f30f479903ec82ac (patch)
tree148ffdf809917beadaaed02e45145f0884a0e750 /libavfilter/vf_weave.c
parentac3f9be330f39e18edb4d720b461b01c8da10684 (diff)
downloadffmpeg-653ca058079ccf65f487abd5f30f479903ec82ac.tar.gz
avfilter/vf_weave: do not leak unused frame
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/vf_weave.c')
-rw-r--r--libavfilter/vf_weave.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavfilter/vf_weave.c b/libavfilter/vf_weave.c
index 2f0784e703..a5fc1b7403 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,
};