[FFmpeg-cvslog] Dont leak sws contexts.

Michael Niedermayer git at videolan.org
Sun Apr 3 18:20:08 CEST 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Mar  9 03:30:24 2011 +0100| [bbd1c43fa3231cae594e9103a0e041977eafa244] | committer: Michael Niedermayer

Dont leak sws contexts.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bbd1c43fa3231cae594e9103a0e041977eafa244
---

 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 b1f1ba5..672c3bf 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);



More information about the ffmpeg-cvslog mailing list