obs-ffmpeg: Align NVENC lookahead logic

Force-enable lookahead if nvEncGetEncodePresetConfig says to.
This commit is contained in:
jpark37
2021-03-16 20:02:20 -07:00
parent eca916527d
commit 7e8a04bbea
+3 -3
View File
@@ -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 */