mirror of https://git.ffmpeg.org/ffmpeg.git
pthread: warn on high thread counts
Signed-off-by: Diego Biurrun <diego@biurrun.de>
This commit is contained in:
parent
a07578f3f2
commit
b68c4ac293
|
@ -1015,6 +1015,11 @@ static void validate_thread_parameters(AVCodecContext *avctx)
|
||||||
avctx->thread_count = 1;
|
avctx->thread_count = 1;
|
||||||
avctx->active_thread_type = 0;
|
avctx->active_thread_type = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (avctx->thread_count > MAX_AUTO_THREADS)
|
||||||
|
av_log(avctx, AV_LOG_WARNING,
|
||||||
|
"Application has requested %d threads. Using a thread count greater than %d is not recommended.\n",
|
||||||
|
avctx->thread_count, MAX_AUTO_THREADS);
|
||||||
}
|
}
|
||||||
|
|
||||||
int ff_thread_init(AVCodecContext *avctx)
|
int ff_thread_init(AVCodecContext *avctx)
|
||||||
|
|
Loading…
Reference in New Issue