mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/nvdec: warn about thread count if applicable
This commit is contained in:
parent
f3f73f0893
commit
538de4354d
|
@ -292,8 +292,15 @@ int ff_nvdec_decode_init(AVCodecContext *avctx)
|
||||||
params.ulNumOutputSurfaces = 1;
|
params.ulNumOutputSurfaces = 1;
|
||||||
|
|
||||||
ret = nvdec_decoder_create(&ctx->decoder_ref, frames_ctx->device_ref, ¶ms, avctx);
|
ret = nvdec_decoder_create(&ctx->decoder_ref, frames_ctx->device_ref, ¶ms, avctx);
|
||||||
if (ret < 0)
|
if (ret < 0) {
|
||||||
|
if (params.ulNumDecodeSurfaces > 32) {
|
||||||
|
av_log(avctx, AV_LOG_WARNING, "Using more than 32 (%d) decode surfaces might cause nvdec to fail.\n",
|
||||||
|
(int)params.ulNumDecodeSurfaces);
|
||||||
|
av_log(avctx, AV_LOG_WARNING, "Try lowering the amount of threads. Using %d right now.\n",
|
||||||
|
avctx->thread_count);
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
pool = av_mallocz(sizeof(*pool));
|
pool = av_mallocz(sizeof(*pool));
|
||||||
if (!pool) {
|
if (!pool) {
|
||||||
|
|
Loading…
Reference in New Issue