mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-12 01:40:04 +01:00
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:
@@ -68,7 +68,7 @@ static unsigned long openssl_thread_id(void)
|
||||
|
||||
int ff_openssl_init(void)
|
||||
{
|
||||
avpriv_lock_avformat();
|
||||
ff_lock_avformat();
|
||||
if (!openssl_init) {
|
||||
SSL_library_init();
|
||||
SSL_load_error_strings();
|
||||
@@ -77,7 +77,7 @@ int ff_openssl_init(void)
|
||||
int i;
|
||||
openssl_mutexes = av_malloc_array(sizeof(pthread_mutex_t), CRYPTO_num_locks());
|
||||
if (!openssl_mutexes) {
|
||||
avpriv_unlock_avformat();
|
||||
ff_unlock_avformat();
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
|
||||
@@ -91,14 +91,14 @@ int ff_openssl_init(void)
|
||||
#endif
|
||||
}
|
||||
openssl_init++;
|
||||
avpriv_unlock_avformat();
|
||||
ff_unlock_avformat();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ff_openssl_deinit(void)
|
||||
{
|
||||
avpriv_lock_avformat();
|
||||
ff_lock_avformat();
|
||||
openssl_init--;
|
||||
if (!openssl_init) {
|
||||
#if HAVE_THREADS
|
||||
@@ -111,7 +111,7 @@ void ff_openssl_deinit(void)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
avpriv_unlock_avformat();
|
||||
ff_unlock_avformat();
|
||||
}
|
||||
|
||||
static int print_tls_error(URLContext *h, int ret)
|
||||
|
||||
Reference in New Issue
Block a user