mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
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>
This commit is contained in:
parent
c8422f04a3
commit
79551d2c7a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user