<html><head></head><body>Hi,<br><br>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.<br><br>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.<br><br><div class="gmail_quote">Le 23 septembre 2019 13:49:14 GMT+03:00, Francois Cartegnie <fcvlcdev@free.fr> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">Le 23/09/2019 à 10:51, Thomas Guillem a écrit :<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">It's just a 0/1 semaphore. I don't really know why we use a semaphore here instead of a mutex. <br><br></blockquote><br>Dates from early avcodec threading.<br>The usual comment is : is that still needed ?<br></pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>