[vlc-devel] [PATCH 2/2] avcodec: protect the flush call

Steve Lhomme robux4 at ycbcr.xyz
Mon Sep 23 13:17:28 CEST 2019


On 2019-09-23 12:49, Francois Cartegnie wrote:
> Le 23/09/2019 à 10:51, Thomas Guillem a écrit :
>> It's just a 0/1 semaphore. I don't really know why we use a semaphore here instead of a mutex.
>>
> 
> Dates from early avcodec threading.
> The usual comment is : is that still needed ?

Good question. The main use I see is protecting resources between the 
decoder thread(s) (may not be needed if lavc is guaranteed not to 
request buffers concurrently, which would make sense) and the 
input/decoder thread (which is probably still needed).


More information about the vlc-devel mailing list