aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-10-06 21:08:55 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-10-06 21:08:55 +0200
commitd47dd84391f2a4d9dab36b375019bf05d83a5a29 (patch)
tree7bd409afd14056dfc1ff541700a3ea60c74e8c45 /libavcodec/utils.c
parent67ddf21611b904de1ee3eb0206cd2744a135704a (diff)
parent577899a6458ccad9026eb268f10dc0b39c224c8d (diff)
downloadffmpeg-d47dd84391f2a4d9dab36b375019bf05d83a5a29.tar.gz
Merge commit '577899a6458ccad9026eb268f10dc0b39c224c8d'
* commit '577899a6458ccad9026eb268f10dc0b39c224c8d': lavc: specify the behavior of av_lockmgr_register on failure. Conflicts: libavcodec/avcodec.h libavcodec/utils.c libavcodec/version.h See: a950edb472e8823e34832c7313ba447b2db76f27 Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index c2c557934e..f1ba52cecd 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -3492,12 +3492,12 @@ int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op))
void *new_avformat_mutex = NULL;
int err;
if (err = cb(&new_codec_mutex, AV_LOCK_CREATE)) {
- return err > 0 ? AVERROR_EXTERNAL : err;
+ return err > 0 ? AVERROR_UNKNOWN : err;
}
if (err = cb(&new_avformat_mutex, AV_LOCK_CREATE)) {
// Ignore failures to destroy the newly created mutex.
cb(&new_codec_mutex, AV_LOCK_DESTROY);
- return err > 0 ? AVERROR_EXTERNAL : err;
+ return err > 0 ? AVERROR_UNKNOWN : err;
}
lockmgr_cb = cb;
codec_mutex = new_codec_mutex;
@@ -3536,6 +3536,7 @@ int ff_unlock_avcodec(void)
if ((*lockmgr_cb)(&codec_mutex, AV_LOCK_RELEASE))
return -1;
}
+
return 0;
}