[FFmpeg-cvslog] vf_scale: don't leak SWS context.
Michael Niedermayer
git at videolan.org
Sun Aug 28 00:26:37 CEST 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Mar 9 03:30:24 2011 +0100| [52982dbe474663709033e1ad259f8ff7a5a2eefa] | committer: Anton Khirnov
vf_scale: don't leak SWS context.
Signed-off-by: Anton Khirnov <anton at khirnov.net>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=52982dbe474663709033e1ad259f8ff7a5a2eefa
---
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 9ec686f..5217bd0 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);
More information about the ffmpeg-cvslog
mailing list