[FFmpeg-cvslog] Dont leak sws contexts.
Stefano Sabatini
stefano.sabatini-lala at poste.it
Fri Apr 15 11:56:49 CEST 2011
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?
AFAIK config should be called just once, if that's not the case also
the other sws contexts should be freed as well.
More information about the ffmpeg-cvslog
mailing list