obs-ffmpeg: Force I-Frame when reconfiguring jim-nvenc

This forces an I-Frame when reconfiguring encoding parameters so that
the changes apply immediately.
This commit is contained in:
pkv 2019-08-23 12:48:19 +02:00 committed by jp9000
parent 707f83f57d
commit 1a11e15a30

View File

@ -240,6 +240,8 @@ static bool nvenc_update(void *data, obs_data_t *settings)
NV_ENC_RECONFIGURE_PARAMS params = {0};
params.version = NV_ENC_RECONFIGURE_PARAMS_VER;
params.reInitEncodeParams = enc->params;
params.resetEncoder = 1;
params.forceIDR = 1;
if (FAILED(nv.nvEncReconfigureEncoder(enc->session, &params))) {
return false;