|
|
@ -798,6 +798,27 @@ int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec) |
|
|
|
} |
|
|
|
} |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int attribute_align_arg ff_codec_open2_recursive(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
int ret = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
entangled_thread_counter--; |
|
|
|
|
|
|
|
/* Release any user-supplied mutex. */ |
|
|
|
|
|
|
|
if (ff_lockmgr_cb) { |
|
|
|
|
|
|
|
(*ff_lockmgr_cb)(&codec_mutex, AV_LOCK_RELEASE); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ret = avcodec_open2(avctx, codec, options); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* If there is a user-supplied mutex locking routine, call it. */ |
|
|
|
|
|
|
|
if (ff_lockmgr_cb) { |
|
|
|
|
|
|
|
if ((*ff_lockmgr_cb)(&codec_mutex, AV_LOCK_OBTAIN)) |
|
|
|
|
|
|
|
return -1; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
entangled_thread_counter++; |
|
|
|
|
|
|
|
return ret; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options) |
|
|
|
int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options) |
|
|
|
{ |
|
|
|
{ |
|
|
|
int ret = 0; |
|
|
|
int ret = 0; |
|
|
@ -1809,6 +1830,27 @@ void avsubtitle_free(AVSubtitle *sub) |
|
|
|
memset(sub, 0, sizeof(AVSubtitle)); |
|
|
|
memset(sub, 0, sizeof(AVSubtitle)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
av_cold int ff_codec_close_recursive(AVCodecContext *avctx) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
int ret = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
entangled_thread_counter--; |
|
|
|
|
|
|
|
/* Release any user-supplied mutex. */ |
|
|
|
|
|
|
|
if (ff_lockmgr_cb) { |
|
|
|
|
|
|
|
(*ff_lockmgr_cb)(&codec_mutex, AV_LOCK_RELEASE); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ret = avcodec_close(avctx); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* If there is a user-supplied mutex locking routine, call it. */ |
|
|
|
|
|
|
|
if (ff_lockmgr_cb) { |
|
|
|
|
|
|
|
if ((*ff_lockmgr_cb)(&codec_mutex, AV_LOCK_OBTAIN)) |
|
|
|
|
|
|
|
return -1; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
entangled_thread_counter++; |
|
|
|
|
|
|
|
return ret; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
av_cold int avcodec_close(AVCodecContext *avctx) |
|
|
|
av_cold int avcodec_close(AVCodecContext *avctx) |
|
|
|
{ |
|
|
|
{ |
|
|
|
/* If there is a user-supplied mutex locking routine, call it. */ |
|
|
|
/* If there is a user-supplied mutex locking routine, call it. */ |
|
|
|