[FFmpeg-devel] Buffers Threads and refcounts

Reimar Döffinger Reimar.Doeffinger at gmx.de
Wed Jan 9 19:54:19 CET 2013

On Wed, Jan 09, 2013 at 03:43:03PM +0100, Hendrik Leppkes wrote:
> > If you interface with libavcodec/libavfilter and the buffers you have
> > from whichever platform specific API (de)uxer, (decoder, display, ...
> > arent refcounted but instead only valid till the next call or return.
> > Then you do NOT need a copy now in many cases but will need one with
> > the new API
> > (at least thats how i understand it, please correct me
> >  if i missed something)
> >
> It should be very much possible to use non-refcounted buffers still,
> at least i saw this in one of the new lavu headers. If a
> non-refcounted buffer is encountered and lavfi needs to store it for
> later, it should copy it to a ref-counted buffer, like its done now
> with buffers without the "keep" permission. At least i don't see how
> the API would limit this by design.

Huh? You're countering Michael's argument that this (very common) use
case will now need an additional memcpy by saying that it is supported
by doing a memcpy? That makes no sense to me.

More information about the ffmpeg-devel mailing list