diff options
author | Janne Grunau <janne-libav@jannau.net> | 2013-04-22 15:31:58 +0200 |
---|---|---|
committer | Janne Grunau <janne-libav@jannau.net> | 2013-04-22 17:11:20 +0200 |
commit | 94660c35249e11c53b9a9f0c2f85c4335b21eda7 (patch) | |
tree | df31af00cb09ff84eb84f708ed44c051b7bc585e /libavcodec | |
parent | f13888afcc5e528b80e4ae5bc4f0d9dadc76f6aa (diff) | |
download | ffmpeg-94660c35249e11c53b9a9f0c2f85c4335b21eda7.tar.gz |
threads: always call thread_finish_setup for intra codecs
Intra codecs do not need an update_thread_context() function and never
call ff_thread_finish_setup(). They rely on ff_thread_get_buffer()
calling it. So call it even if the get_buffer2 function pointer is
avcodec_default_get_buffer2 and it has not been called before.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/pthread.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c index 404804dec1..1dbfe3d221 100644 --- a/libavcodec/pthread.c +++ b/libavcodec/pthread.c @@ -947,9 +947,9 @@ int ff_thread_get_buffer(AVCodecContext *avctx, ThreadFrame *f, int flags) pthread_mutex_unlock(&p->progress_mutex); - if (!avctx->codec->update_thread_context) - ff_thread_finish_setup(avctx); } + if (!avctx->thread_safe_callbacks && !avctx->codec->update_thread_context) + ff_thread_finish_setup(avctx); if (err) av_buffer_unref(&f->progress); |