From 86a13bf2ffb40d44260d5747a4782a42a43a1ed8 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 21 Dec 2017 22:54:06 +0100 Subject: 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. --- libavcodec/internal.h | 3 --- libavcodec/utils.c | 11 ----------- 2 files changed, 14 deletions(-) (limited to 'libavcodec') diff --git a/libavcodec/internal.h b/libavcodec/internal.h index fcbdb6c04d..30614bb2b1 100644 --- a/libavcodec/internal.h +++ b/libavcodec/internal.h @@ -247,9 +247,6 @@ extern volatile int ff_avcodec_locked; int ff_lock_avcodec(AVCodecContext *log_ctx, const AVCodec *codec); int ff_unlock_avcodec(const AVCodec *codec); -int avpriv_lock_avformat(void); -int avpriv_unlock_avformat(void); - /** * Maximum size in bytes of extradata. * This value was chosen such that every bit of the buffer is diff --git a/libavcodec/utils.c b/libavcodec/utils.c index eec4437693..9c631c4fb0 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -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) + -- cgit v1.2.3