提交 79551d2c 编写于 作者: M Manfred Georg 提交者: 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: NMichael Niedermayer <michaelni@gmx.at>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册