summaryrefslogtreecommitdiff
path: root/libavcodec/nvenc.c
diff options
context:
space:
mode:
authorTimo Rothenpieler <timo@rothenpieler.org>2022-12-05 21:10:36 +0100
committerTimo Rothenpieler <timo@rothenpieler.org>2022-12-05 21:21:41 +0100
commitac0f42d8939351747fcb6938d4bdebc970b8ee0e (patch)
tree8ec458345d7d26a9970121a36c85c7504e18c5c0 /libavcodec/nvenc.c
parent520111c610545f49eea526db3ae706e3dcd52e2b (diff)
downloadffmpeg-ac0f42d8939351747fcb6938d4bdebc970b8ee0e.tar.gz
avcodec/nvenc: explicitly disable lookahead if lacking sufficient surfaces
It could already be enabled by the preset, so it needs explicitly disabled in this case.
Diffstat (limited to 'libavcodec/nvenc.c')
-rw-r--r--libavcodec/nvenc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index 9726c565d3..30c10f394a 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -1076,6 +1076,7 @@ static av_cold void nvenc_setup_rate_control(AVCodecContext *avctx)
ctx->encode_config.frameIntervalP - 4;
if (lkd_bound < 0) {
+ ctx->encode_config.rcParams.enableLookahead = 0;
av_log(avctx, AV_LOG_WARNING,
"Lookahead not enabled. Increase buffer delay (-delay).\n");
} else {