summaryrefslogtreecommitdiff
path: root/libavutil/thread.h
diff options
context:
space:
mode:
authorwm4 <nfxjfg@googlemail.com>2017-12-21 22:39:24 +0100
committerwm4 <nfxjfg@googlemail.com>2017-12-26 02:50:00 +0100
commita04c2c707de2ce850f79870e84ac9d7ec7aa9143 (patch)
tree4bdb5adb913831db5a209a35ae7813e038be1bc4 /libavutil/thread.h
parent9b121dfc32810250938021952aab4172a988cb56 (diff)
downloadffmpeg-a04c2c707de2ce850f79870e84ac9d7ec7aa9143.tar.gz
lavc: replace and deprecate the lock manager
Use static mutexes instead of requiring a lock manager. The behavior should be roughly the same before and after this change for API users which did not set the lock manager at all (except that a minor memory leak disappears).
Diffstat (limited to 'libavutil/thread.h')
-rw-r--r--libavutil/thread.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavutil/thread.h b/libavutil/thread.h
index 309414aa7d..cc5272d379 100644
--- a/libavutil/thread.h
+++ b/libavutil/thread.h
@@ -134,6 +134,7 @@ static inline int strict_pthread_once(pthread_once_t *once_control, void (*init_
#endif
#define AVMutex pthread_mutex_t
+#define AV_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
#define ff_mutex_init pthread_mutex_init
#define ff_mutex_lock pthread_mutex_lock
@@ -148,6 +149,7 @@ static inline int strict_pthread_once(pthread_once_t *once_control, void (*init_
#else
#define AVMutex char
+#define AV_MUTEX_INITIALIZER 0
static inline int ff_mutex_init(AVMutex *mutex, const void *attr){ return 0; }
static inline int ff_mutex_lock(AVMutex *mutex){ return 0; }