mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-03 05:10:03 +02:00
avcodec/nvenc: change flag of cuCtxCreate to avoid CPU spins
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
This commit is contained in:
parent
f58e011a1f
commit
81071eea7d
@ -580,7 +580,7 @@ static av_cold int nvenc_encode_init(AVCodecContext *avctx)
|
||||
}
|
||||
|
||||
ctx->cu_context = NULL;
|
||||
cu_res = dl_fn->cu_ctx_create(&ctx->cu_context, 0, dl_fn->nvenc_devices[ctx->gpu]);
|
||||
cu_res = dl_fn->cu_ctx_create(&ctx->cu_context, 4, dl_fn->nvenc_devices[ctx->gpu]); // CU_CTX_SCHED_BLOCKING_SYNC=4, avoid CPU spins
|
||||
|
||||
if (cu_res != CUDA_SUCCESS) {
|
||||
av_log(avctx, AV_LOG_FATAL, "Failed creating CUDA context for NVENC: 0x%x\n", (int)cu_res);
|
||||
|
Loading…
Reference in New Issue
Block a user