Commit 79551d2c authored by Manfred Georg's avatar Manfred Georg Committed by Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent c8422f04
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment