[vlc-devel] Hi, Clarification regarding "wait_mt" and "post_mt" in modules/codec/avcodec/video.c

Rémi Denis-Courmont remi at remlab.net
Wed Aug 23 22:24:15 CEST 2017

Le tiistaina 22. elokuuta 2017, 9.43.00 EEST Dafna Hirschfeld a écrit :
> Hi,
> I am not from the VLC team, just trying to add my own decoder module.
> I want to understand the use of  *wait_mt* and *post_mt* in
> *modules/codec/avcodec/video.c*
> These calls lock an inner lock *p_sys->sem_mt* so I understand that these
> calls are used to deal with multi-threading in the ffmpeg api, am I right ?


> Can I assume that if *p_sys->p_context->thread_count* is 1 then those calls
> are unneeded ?


> Also , does it also relate to the use of the*
> p_sys->p_context->get_buffer2* callback ?


> maybe because it might be called asynchronously ?


> If *p_sys->p_context->get_buffer2 * is set to NULL,  are these calls still
> needed ?

If all asynchronous callbacks are eliminated.


More information about the vlc-devel mailing list