[FFmpeg-devel] [PATCH] avfilter: pool draining and self destruction support.

Michael Niedermayer michaelni at gmx.at
Thu Jan 12 16:11:14 CET 2012


On Thu, Jan 12, 2012 at 10:36:42AM +0100, Stefano Sabatini wrote:
> 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.

nits fixed & applied
thanks

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

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- 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-devel/attachments/20120112/da49a720/attachment.asc>


More information about the ffmpeg-devel mailing list