<div dir="ltr">I'm going to cut and paste from a previous answer I've given on this forum:<div><br></div><div>"See <a href="https://stackoverflow.com/questions/13888915/thread-safety-of-libav-ffmpeg" target="_blank">https://stackoverflow.com/questions/13888915/<span class="gmail-il">thread</span>-safety-of-libav-<span class="gmail-il">ffmpeg</span></a> for more details. There are a few particular methods that have <span class="gmail-il">thread</span> safety concerns: writing frames is one. Opening a codec is also not <span class="gmail-il">thread</span> <span class="gmail-il">safe</span>: <a href="https://stackoverflow.com/questions/15366441/ffmpeg-which-functions-are-multithreading-safe" target="_blank">https://stackoverflow.com/questions/15366441/<span class="gmail-il">ffmpeg</span>-which-functions-are-multithreading-<span class="gmail-il">safe</span></a> ."<br></div><div><br></div><div>Follow the directions in the StackOverflow response to create your own lock manager. It's relatively straightforward.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 2, 2019 at 10:19 AM Gonzalo Garramuño <<a href="mailto:ggarra13@gmail.com">ggarra13@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF">
    <p><br>
    </p>
    <div class="gmail-m_1958512411382946732moz-cite-prefix">El 1/8/19 a las 10:35, qw escribió:<br>
    </div>
    <blockquote type="cite">
      
      <div style="line-height:1.7;color:rgb(0,0,0);font-size:14px;font-family:Arial">
        <div>Hi,</div>
        <div><br>
        </div>
        <div>I have one question:</div>
        <div><br>
        </div>
        <div>Is avio_write() thread-safe?</div>
        <div><br>
        </div>
        <div>Are those functions thread-safe, i.e. fprintf() and
          fflush() ?</div>
        <br>
      </div>
    </blockquote>
    No.<br>
    <pre class="gmail-m_1958512411382946732moz-signature" cols="72">-- 
Gonzalo Garramuño</pre>
  </div>

_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br>
<a href="https://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">https://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br>
To unsubscribe, visit link above, or email<br>
<a href="mailto:libav-user-request@ffmpeg.org" target="_blank">libav-user-request@ffmpeg.org</a> with subject "unsubscribe".</blockquote></div>