[FFmpeg-devel] [PATCH] avcodec thread safety fix
Sun May 31 09:07:33 CEST 2009
Baptiste Coudurier wrote:
> Andreas ?man wrote:
>> Art Clarke wrote:
>>> So I take back my recommendation :) Ship it.
>> Ok, I've applied the patch now. And i've also tested it with my
>> own mediaplayer and it seems to work fine.
> Your own ? What is it ? :)
It uses FFmpeg not only for playing media, but also for loading
all images/icons, etc in the UI using lots of threads so it's
quite thread intensive.
> Btw, it may be nice to have an example of its utilization, it would help
> users for sure.
Sure, a typical callback would look like this (for pthreads).
Perhaps add this to APIChanges?
lockmgr(void **mtx, enum AVLockOp op)
*mtx = malloc(sizeof(pthread_mutex_t));
return !!pthread_mutex_init(*mtx, NULL);
// During application startup.
// During application shutdown.
More information about the ffmpeg-devel