[FFmpeg-cvslog] ff_lock_avcodec: make the lock state be consistent in case of failure.
Michael Niedermayer
git at videolan.org
Thu Dec 6 03:17:39 CET 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Dec 6 02:21:11 2012 +0100| [7885fa7685c0085e42495482e6b79310f8d66dbc] | committer: Michael Niedermayer
ff_lock_avcodec: make the lock state be consistent in case of failure.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7885fa7685c0085e42495482e6b79310f8d66dbc
---
libavcodec/utils.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 131c156..d042afa 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -2555,6 +2555,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");
+ ff_avcodec_locked = 1;
+ ff_unlock_avcodec();
return AVERROR(EINVAL);
}
av_assert0(!ff_avcodec_locked);
More information about the ffmpeg-cvslog
mailing list