[FFmpeg-devel] [PATCH] avfilter: pool draining and self destruction support.
Stefano Sabatini
stefasab at gmail.com
Thu Jan 12 10:36:42 CET 2012
On date Thursday 2012-01-12 02:35:16 +0100, Michael Niedermayer encoded:
> This should fix a memleak.
>
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> ---
> libavfilter/avfilter.c | 53 +++++++++++++++++++++++++++++++----------------
> libavfilter/defaults.c | 6 ++++-
> libavfilter/internal.h | 2 +
> 3 files changed, 42 insertions(+), 19 deletions(-)
>
> diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
> index 97f78e4..e665f50 100644
> --- a/libavfilter/avfilter.c
> +++ b/libavfilter/avfilter.c
> @@ -81,12 +81,40 @@ AVFilterBufferRef *avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask)
> return ret;
> }
>
> +static void free_pool(AVFilterPool *pool){
Nit++: "{" on separate line
> + int i;
> +
> + av_assert0(pool->refcount > 0);
> +
> + for (i = 0; i < POOL_SIZE; i++) {
> + if (pool->pic[i]) {
> + AVFilterBufferRef *picref = pool->pic[i];
> + /* free buffer: picrefs stored in the pool are not
> + * supposed to contain a free callback */
nit++: weird indent
[...]
Rest looks good to me, thanks.
--
FFmpeg = Frenzy and Fantastic Meaningful Pitiful Embarassing Goblin
More information about the ffmpeg-devel
mailing list