mirror of https://git.ffmpeg.org/ffmpeg.git
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.
This commit is contained in:
parent
f13888afcc
commit
94660c3524
|
@ -947,9 +947,9 @@ int ff_thread_get_buffer(AVCodecContext *avctx, ThreadFrame *f, int flags)
|
||||||
|
|
||||||
pthread_mutex_unlock(&p->progress_mutex);
|
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)
|
if (err)
|
||||||
av_buffer_unref(&f->progress);
|
av_buffer_unref(&f->progress);
|
||||||
|
|
Loading…
Reference in New Issue