diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-03-09 03:30:24 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2011-08-27 17:23:45 +0200 |
commit | 52982dbe474663709033e1ad259f8ff7a5a2eefa (patch) | |
tree | b56713b5cc86cb8ab6f50875c1032f6d50717afc | |
parent | fa19c5c20e862fdb824f6b760b1c2681ec3206b0 (diff) | |
download | ffmpeg-52982dbe474663709033e1ad259f8ff7a5a2eefa.tar.gz |
vf_scale: don't leak SWS context.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
-rw-r--r-- | libavfilter/vf_scale.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c index 9ec686f8f9..5217bd07f7 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter/vf_scale.c @@ -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); |