Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-05-18 14:46:28 +0400
committerMichael Niedermayer <michaelni@gmx.at>2014-05-18 14:46:28 +0400
commitff17d8b56ec87fe1516ddd49b0bdea81f22904af (patch)
tree78627e21ab001f1e5af5930bfb3fa854114a73b6 /libavcodec/utils.c
parent17c8a069167e055b33813aa9a29220c3563573b7 (diff)
parente1b66778b6ee82a192b5895e23c4e135f7269326 (diff)
Merge commit 'e1b66778b6ee82a192b5895e23c4e135f7269326'
* commit 'e1b66778b6ee82a192b5895e23c4e135f7269326': lavc: remove the locking code in avcodec_close() Conflicts: libavcodec/utils.c Note, if someone knows of a external codec lib/API, hwaccel or other that requires locking on its close/free side, please contact ffmpeg-devel. Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 94df4b7855..8e813d0dbb 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -2671,33 +2671,22 @@ av_cold int ff_codec_close_recursive(AVCodecContext *avctx)
{
int ret = 0;
- ff_unlock_avcodec();
-
ret = avcodec_close(avctx);
- ff_lock_avcodec(NULL);
return ret;
}
av_cold int avcodec_close(AVCodecContext *avctx)
{
- int ret;
-
if (!avctx)
return 0;
- ret = ff_lock_avcodec(avctx);
- if (ret < 0)
- return ret;
-
if (avcodec_is_open(avctx)) {
FramePool *pool = avctx->internal->pool;
int i;
if (CONFIG_FRAME_THREAD_ENCODER &&
avctx->internal->frame_thread_encoder && avctx->thread_count > 1) {
- ff_unlock_avcodec();
ff_frame_thread_encoder_free(avctx);
- ff_lock_avcodec(avctx);
}
if (HAVE_THREADS && avctx->internal->thread_ctx)
ff_thread_free(avctx);
@@ -2727,7 +2716,6 @@ av_cold int avcodec_close(AVCodecContext *avctx)
avctx->codec = NULL;
avctx->active_thread_type = 0;
- ff_unlock_avcodec();
return 0;
}