mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Dont leak sws contexts.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
2f9815dd26
commit
bbd1c43fa3
@ -144,6 +144,8 @@ static int config_props(AVFilterLink *outlink)
|
|||||||
|
|
||||||
scale->input_is_pal = av_pix_fmt_descriptors[inlink->format].flags & PIX_FMT_PAL;
|
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,
|
scale->sws = sws_getContext(inlink ->w, inlink ->h, inlink ->format,
|
||||||
outlink->w, outlink->h, outlink->format,
|
outlink->w, outlink->h, outlink->format,
|
||||||
scale->flags, NULL, NULL, NULL);
|
scale->flags, NULL, NULL, NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user