avcodec_open: if obtaining a lock fails, dont attempt to unlock it.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -803,7 +803,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
|
|||||||
|
|
||||||
ret = ff_lock_avcodec(avctx);
|
ret = ff_lock_avcodec(avctx);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto end;
|
return ret;
|
||||||
|
|
||||||
avctx->internal = av_mallocz(sizeof(AVCodecInternal));
|
avctx->internal = av_mallocz(sizeof(AVCodecInternal));
|
||||||
if (!avctx->internal) {
|
if (!avctx->internal) {
|
||||||
|
Reference in New Issue
Block a user