diff options
author | Manfred Georg <mgeorg@google.com> | 2014-09-30 15:20:42 -0700 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-01 00:56:53 +0200 |
commit | 79551d2c7a772ea971e94f0b8dc03d1e897e8d86 (patch) | |
tree | 7d7472c319d745c5f38b1c69fef3f2a1d5c7c728 /libavcodec | |
parent | c8422f04a3256a9abc01588f1b4aa95f5aadc891 (diff) | |
download | ffmpeg-79551d2c7a772ea971e94f0b8dc03d1e897e8d86.tar.gz |
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.c | 2 |
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; |