[vlc-devel] [PATCH 2/2] avcodec: protect the flush call
remi at remlab.net
Mon Sep 23 18:25:31 CEST 2019
I don't know exactly what synchronisation was needed then and now for avcodec per se, as opposed to what Laurent did for old VLC core or just out of uncertainty.
But there is one difference between a semaphore lock and a mutex lock. The earlier can be released from a different thread than the one which acquired it. The splitter uses semaphores for that reason: it cannot assume that the releasing thread is the acquiring thread.
Le 23 septembre 2019 13:49:14 GMT+03:00, Francois Cartegnie <fcvlcdev at free.fr> a écrit :
>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 ?
>VideoLAN - VLC Developer
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vlc-devel