mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-21 12:49:40 +08:00
obs-ffmpeg: Align NVENC lookahead logic
Force-enable lookahead if nvEncGetEncodePresetConfig says to.
This commit is contained in:
@@ -462,11 +462,11 @@ static bool init_encoder(struct nvenc_data *enc, obs_data_t *settings)
|
||||
enc->bframes = bf;
|
||||
|
||||
/* lookahead */
|
||||
if (lookahead && nv_get_cap(enc, NV_ENC_CAPS_SUPPORT_LOOKAHEAD)) {
|
||||
lookahead = nv_get_cap(enc, NV_ENC_CAPS_SUPPORT_LOOKAHEAD) &&
|
||||
(lookahead || config->rcParams.enableLookahead);
|
||||
if (lookahead) {
|
||||
config->rcParams.lookaheadDepth = 8;
|
||||
config->rcParams.enableLookahead = 1;
|
||||
} else {
|
||||
lookahead = false;
|
||||
}
|
||||
|
||||
/* psycho aq */
|
||||
|
||||
Reference in New Issue
Block a user