[FFmpeg-devel] [PATCH] boxblur: fix huge memleak in end_frame().
Clément Bœsch
ubitux at gmail.com
Fri Nov 25 00:36:27 CET 2011
On Fri, Nov 25, 2011 at 12:17:15AM +0100, Michael Niedermayer wrote:
> On Thu, Nov 24, 2011 at 08:45:26PM +0100, Clément Bœsch wrote:
> > ---
> > Hi,
> >
> > I have absolutely no idea why this is actually needed here (where are those
> > buffer "referenced"? isn't it supposed to be free'd by the code allocating
> > it?), but it seems to fix a huge memleak in this filter. Easily reproducible
> > with something like: ./ffplay -f lavfi mandelbrot,boxblur=2:2; ~50MB/sec lost
> > here.
>
> As the filter uses the default start frame, the cleanup done by the
> default end frame is needed.
>
Ah, that makes much more sense to me indeed. Please commit with this
comment, that's what I missed :)
> does the following work for you ?
>
Yes, thank you.
> diff --git a/libavfilter/vf_boxblur.c b/libavfilter/vf_boxblur.c
> index db1b579..ddb4b25 100644
> --- a/libavfilter/vf_boxblur.c
> +++ b/libavfilter/vf_boxblur.c
> @@ -325,7 +325,7 @@ static void end_frame(AVFilterLink *inlink)
> boxblur->temp);
>
> avfilter_draw_slice(outlink, 0, inlink->h, 1);
> - avfilter_end_frame(outlink);
> + avfilter_default_end_frame(inlink);
> }
>
> AVFilter avfilter_vf_boxblur = {
>
[...]
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20111125/27853f3a/attachment.asc>
More information about the ffmpeg-devel
mailing list