vf_scale: don't leak SWS context.
Signed-off-by: Anton Khirnov <anton@khirnov.net> (cherry picked from commit 52982dbe474663709033e1ad259f8ff7a5a2eefa) Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
parent
db5e27f94e
commit
2b74db8d27
@ -205,6 +205,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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user