mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-16 04:32:47 +02:00
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: a950edb472
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
+3
-2
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user