lavc, lavf: move avformat static mutex from avcodec to avformat

It's completely absurd that libavcodec would care about libavformat
locking, but it was there because the lock manager was in libavcodec.

This is more stright forward. Changes ABI, but we don't require ABI
compatibility currently.
This commit is contained in:
wm4 2017-12-21 22:54:06 +01:00
parent e24f192a9f
commit 86a13bf2ff
8 changed files with 36 additions and 32 deletions

View file

@ -70,7 +70,6 @@ const char av_codec_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
volatile int ff_avcodec_locked;
static atomic_int entangled_thread_counter = ATOMIC_VAR_INIT(0);
static AVMutex codec_mutex = AV_MUTEX_INITIALIZER;
static AVMutex avformat_mutex = AV_MUTEX_INITIALIZER;
void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size)
{
@ -1904,16 +1903,6 @@ int ff_unlock_avcodec(const AVCodec *codec)
return 0;
}
int avpriv_lock_avformat(void)
{
return ff_mutex_lock(&avformat_mutex) ? -1 : 0;
}
int avpriv_unlock_avformat(void)
{
return ff_mutex_unlock(&avformat_mutex) ? -1 : 0;
}
unsigned int avpriv_toupper4(unsigned int x)
{
return av_toupper(x & 0xFF) +