Commit b09ea25f authored by Michael Niedermayer's avatar Michael Niedermayer

avfilter/vf_lenscorrection: fix memleak

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent f5ddce07
...@@ -111,6 +111,16 @@ static int query_formats(AVFilterContext *ctx) ...@@ -111,6 +111,16 @@ static int query_formats(AVFilterContext *ctx)
return 0; 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) static int config_props(AVFilterLink *outlink)
{ {
AVFilterContext *ctx = outlink->src; AVFilterContext *ctx = outlink->src;
...@@ -214,5 +224,6 @@ AVFilter ff_vf_lenscorrection = { ...@@ -214,5 +224,6 @@ AVFilter ff_vf_lenscorrection = {
.inputs = lenscorrection_inputs, .inputs = lenscorrection_inputs,
.outputs = lenscorrection_outputs, .outputs = lenscorrection_outputs,
.priv_class = &lenscorrection_class, .priv_class = &lenscorrection_class,
.uninit = uninit,
.flags = AVFILTER_FLAG_SLICE_THREADS, .flags = AVFILTER_FLAG_SLICE_THREADS,
}; };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment