Commit 52982dbe authored by Michael Niedermayer's avatar Michael Niedermayer Committed by Anton Khirnov

vf_scale: don't leak SWS context.

Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
parent fa19c5c2
......@@ -206,6 +206,8 @@ static int config_props(AVFilterLink *outlink)
scale->input_is_pal = av_pix_fmt_descriptors[inlink->format].flags & PIX_FMT_PAL;
if (scale->sws)
sws_freeContext(scale->sws);
scale->sws = sws_getContext(inlink ->w, inlink ->h, inlink ->format,
outlink->w, outlink->h, outlink->format,
scale->flags, NULL, NULL, NULL);
......
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