aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-08-21 12:16:07 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-08-21 13:35:30 +0200
commitb09ea25fec615c871ab8bfb00c3863aa0ce0d2c9 (patch)
tree313dada5f432e83354bf1ca6ad1e9d96b35fa077 /libavfilter
parentf5ddce0753c555ac8e9d9364d4a39c5e22e39577 (diff)
downloadffmpeg-b09ea25fec615c871ab8bfb00c3863aa0ce0d2c9.tar.gz
avfilter/vf_lenscorrection: fix memleak
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/vf_lenscorrection.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libavfilter/vf_lenscorrection.c b/libavfilter/vf_lenscorrection.c
index d30a81b033..58184b0e17 100644
--- a/libavfilter/vf_lenscorrection.c
+++ b/libavfilter/vf_lenscorrection.c
@@ -111,6 +111,16 @@ static int query_formats(AVFilterContext *ctx)
return 0;
}
+static av_cold void uninit(AVFilterContext *ctx)
+{
+ LenscorrectionCtx *rect = ctx->priv;
+ int i;
+
+ for (i = 0; i < FF_ARRAY_ELEMS(rect->correction); i++) {
+ av_freep(&rect->correction[i]);
+ }
+}
+
static int config_props(AVFilterLink *outlink)
{
AVFilterContext *ctx = outlink->src;
@@ -214,5 +224,6 @@ AVFilter ff_vf_lenscorrection = {
.inputs = lenscorrection_inputs,
.outputs = lenscorrection_outputs,
.priv_class = &lenscorrection_class,
+ .uninit = uninit,
.flags = AVFILTER_FLAG_SLICE_THREADS,
};