[FFmpeg-devel] [PATCH] boxblur: fix huge memleak in end_frame().
Clément Bœsch
ubitux at gmail.com
Thu Nov 24 20:45:26 CET 2011
---
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.
---
libavfilter/vf_boxblur.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/libavfilter/vf_boxblur.c b/libavfilter/vf_boxblur.c
index db1b579..681cc40 100644
--- a/libavfilter/vf_boxblur.c
+++ b/libavfilter/vf_boxblur.c
@@ -326,6 +326,8 @@ static void end_frame(AVFilterLink *inlink)
avfilter_draw_slice(outlink, 0, inlink->h, 1);
avfilter_end_frame(outlink);
+ avfilter_unref_buffer(inpicref);
+ avfilter_unref_buffer(outpicref);
}
AVFilter avfilter_vf_boxblur = {
--
1.7.7.4
More information about the ffmpeg-devel
mailing list