[FFmpeg-devel] [PATCH] lavfi: unify asink_buffer and vsink_buffer API

Stefano Sabatini stefano.sabatini-lala at poste.it
Mon Aug 29 17:10:29 CEST 2011


On date Saturday 2011-08-27 18:40:44 +0200, Michael Niedermayer encoded:
> On Sat, Aug 27, 2011 at 04:36:44PM +0200, Stefano Sabatini wrote:
> > On date Saturday 2011-08-27 01:19:36 +0200, Michael Niedermayer encoded:
[...]
> > +/**
> > + * Get an audio/video buffer data from buffer_sink and put it in bufref.
> > + *
> > + * This function works with both audio and video buffer sinks.
> > + *
> > + * @param buffer_sink pointer to a buffersink or abuffersink context
> 
> maybe the function could free the parameters too ?
> would simplify the calling code if its possible

Updated and simplified.

I'd like to avoid to implement a destructive behavior by default.

Maybe we could specify an additional parameter params->set_me_free so
that the struct is automatically freed when init is called on it, not
that it looks a very good idea at first sight, and you have an hanging
pointer even in that case (unless you pass a **params).
-- 
FFmpeg = Free Faithless Merciful Problematic Elitist Game
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lavfi-unify-asink_buffer-and-vsink_buffer-API.patch
Type: text/x-diff
Size: 24917 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110829/3ed83d3f/attachment.bin>


More information about the ffmpeg-devel mailing list