diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-07-24 01:04:24 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-07-24 01:11:09 +0200 |
commit | 274a50ab57381c67946923acdf7ed6e2c7008790 (patch) | |
tree | 26360aa56d9b39a417cdea0ba6c65a5e1b484d21 /libavcodec/utils.c | |
parent | 55db06af64d1acb7c3e304d61e7a1f265139d27a (diff) | |
download | ffmpeg-274a50ab57381c67946923acdf7ed6e2c7008790.tar.gz |
avcodec/utils: Warn the user about the lack of a lock manager if insufficient locks are detected
A lock manager is not the only possibility to avoid open/close locking
issues but its easier and more robust than maintaining a lot of lock/unlock
calls.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/utils.c')
-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 ea83fe8a1e..20d487c52e 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -3073,6 +3073,8 @@ int ff_lock_avcodec(AVCodecContext *log_ctx) entangled_thread_counter++; if (entangled_thread_counter != 1) { av_log(log_ctx, AV_LOG_ERROR, "Insufficient thread locking around avcodec_open/close()\n"); + if (!lockmgr_cb) + av_log(log_ctx, AV_LOG_ERROR, "No lock manager is set, please see av_lockmgr_register()\n"); ff_avcodec_locked = 1; ff_unlock_avcodec(); return AVERROR(EINVAL); |