[FFmpeg-cvslog] Dont leak sws contexts.

Michael Niedermayer michaelni at gmx.at
Sat Apr 16 17:08:57 CEST 2011


On Fri, Apr 15, 2011 at 11:56:49AM +0200, Stefano Sabatini wrote:
> On date Sunday 2011-04-03 18:20:08 +0200, Michael Niedermayer wrote:
> > 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);
> 
> What's the point of this change?

i must admit, i dont remember
you could put a av_assert0() there and see if it triggers on fate
or normal useage

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-cvslog/attachments/20110416/dd901d31/attachment.asc>


More information about the ffmpeg-cvslog mailing list