[FFmpeg-devel] REQUEST: Thread-safe avfilter_yyy_buffer

Robert Nagy ronag89 at gmail.com
Tue May 22 15:40:56 CEST 2012

I would like to request that avfilter_ref_buffer and
avfilter_unref_buffer would be thread-safe. As it is now it is a bit
complicated to use lavfi in third party applications where I either
have to copy the buffer data or make sure that all buffers are
deallocated on the same thread as the graph is running (which is not
always trivial).

Right now I solve this by wrapping AVFilterBufferRef objects into
another thread safe reference counted object which on ref == 0 puts
instances into a thread safe queue which is emptied everytime the
graph is called (correct thread). I feel this is a bit overly complex.

More information about the ffmpeg-devel mailing list