summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorManfred Georg <mgeorg@google.com>2014-09-30 15:20:42 -0700
committerMichael Niedermayer <michaelni@gmx.at>2014-10-01 00:56:53 +0200
commit79551d2c7a772ea971e94f0b8dc03d1e897e8d86 (patch)
tree7d7472c319d745c5f38b1c69fef3f2a1d5c7c728 /libavcodec
parentc8422f04a3256a9abc01588f1b4aa95f5aadc891 (diff)
avcodec/utils: Force mutex to NULL after destruction.
A badly behaving user provided mutex manager (such as that in OpenCV) may not reset the mutex to NULL on destruction. This can cause a problem for a later mutex manager (which may assert that the mutex is NULL before creating). Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 9eb2b5b6ed..778bdc6c2d 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -3461,6 +3461,8 @@ int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op))
return -1;
if (lockmgr_cb(&avformat_mutex, AV_LOCK_DESTROY))
return -1;
+ codec_mutex = NULL;
+ avformat_mutex = NULL;
}
lockmgr_cb = cb;