[FFmpeg-devel] [RFC][PATCH 18/18] avcodec/avpacket: make the AVPacketList API thread safe

James Almer jamrial at gmail.com
Thu Nov 19 03:57:31 EET 2020


On 11/18/2020 5:08 PM, Marton Balint wrote:
> 
> 
> On Wed, 18 Nov 2020, James Almer wrote:
> 
>> Signed-off-by: James Almer <jamrial at gmail.com>
>> ---
>> I don't know if this is necessary, so i'm sending it as an RFC.
> 
> I don't think this API should provide locking by default, maybe as an 
> option. But considering that it was not often needed so far, and the API 
> can be wrapped into locked versions (like decklink does) relatively 
> easily, I think it is fine as is.

My worry was adding a linked list public API that's not thread safe.

The other example we have is AVBufferPool, which does locking 
unconditionally by itself before adding or removing elements from the 
list, so it's valid to assume this one should maybe do the same.


More information about the ffmpeg-devel mailing list