Commit 36d34903 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '30e25643'

* commit '30e25643':
  lavc/pthread: remove obsolete checks

Conflicts:
	libavcodec/utils.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 1e9a050b 30e25643
......@@ -1146,23 +1146,16 @@ static void validate_thread_parameters(AVCodecContext *avctx)
int ff_thread_init(AVCodecContext *avctx)
{
if (avctx->thread_opaque) {
av_log(avctx, AV_LOG_ERROR, "avcodec_thread_init is ignored after avcodec_open\n");
return -1;
}
#if HAVE_W32THREADS
w32thread_init();
#endif
if (avctx->codec) {
validate_thread_parameters(avctx);
if (avctx->active_thread_type&FF_THREAD_SLICE)
return thread_init(avctx);
else if (avctx->active_thread_type&FF_THREAD_FRAME)
return frame_thread_init(avctx);
}
return 0;
}
......
......@@ -1173,7 +1173,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
goto free_and_end;
}
if (HAVE_THREADS && !avctx->thread_opaque
if (HAVE_THREADS
&& !(avctx->internal->frame_thread_encoder && (avctx->active_thread_type&FF_THREAD_FRAME))) {
ret = ff_thread_init(avctx);
if (ret < 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment