aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-03-09 03:30:24 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-04-03 16:40:12 +0200
commitbbd1c43fa3231cae594e9103a0e041977eafa244 (patch)
tree3b172637b673f62694a9976e305f5936967368c5
parent2f9815dd26bf9d63720fb3e0b38900180c35f3b3 (diff)
downloadffmpeg-bbd1c43fa3231cae594e9103a0e041977eafa244.tar.gz
Dont leak sws contexts.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavfilter/vf_scale.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c
index b1f1ba581e..672c3bf65e 100644
--- a/libavfilter/vf_scale.c
+++ b/libavfilter/vf_scale.c
@@ -144,6 +144,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);