[FFmpeg-cvslog] vf_scale: don't leak SWS context.
Michael Niedermayer
git at videolan.org
Thu Sep 22 01:17:26 CEST 2011
ffmpeg | branch: release/0.8 | Michael Niedermayer <michaelni at gmx.at> | Wed Mar 9 03:30:24 2011 +0100| [a7d35b2f99365b56937c144d05ca36ebe5458154] | committer: Anton Khirnov
vf_scale: don't leak SWS context.
Signed-off-by: Anton Khirnov <anton at khirnov.net>
(cherry picked from commit 52982dbe474663709033e1ad259f8ff7a5a2eefa)
Signed-off-by: Anton Khirnov <anton at khirnov.net>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a7d35b2f99365b56937c144d05ca36ebe5458154
---
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 65fe01c..5288d32 100644
--- a/libavfilter/vf_scale.c
+++ b/libavfilter/vf_scale.c
@@ -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);
More information about the ffmpeg-cvslog
mailing list