<div dir="ltr">Hi,<div>I am not from the VLC team, just trying to add my own decoder module.</div><div><br></div><div>I want to understand the use of  <b><i>wait_mt</i></b> and <b><i>post_mt</i></b> in <b><i>modules/codec/avcodec/video.c</i></b></div><div><b><i><br></i></b></div><div>These calls lock an inner lock <b><i>p_sys->sem_mt</i></b> so I understand that these calls are used to deal with multi-threading in the ffmpeg api, am I right ?</div><div><br></div><div>Can I assume that if <b><i>p_sys->p_context->thread_count</i></b> is 1 then those calls are unneeded ?</div><div><br></div><div>Also , does it also relate to the use of the<i><b> p_sys->p_context->get_buffer2</b></i> callback ? maybe because it might be called asynchronously ?</div><div><br></div><div>If <b style="font-style:italic">p_sys->p_context->get_buffer2 </b> is set to NULL,  are these calls still needed ?</div><div><br></div><div>I don't have background in video decoding or using the ffmpeg library. I really appreciate your help.</div><div><br></div><div>Thank you very much.</div><div><br></div><div>Dafna</div></div>