0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 04:42:18 +02:00

obs-ffmpeg: Reinit before retrying init for NVENC

This commit is contained in:
tududweb 2022-08-06 06:56:47 +08:00 committed by Jim
parent 6c364f78cf
commit e16f336882

View File

@ -997,7 +997,10 @@ static bool init_encoder(struct nvenc_data *enc, bool hevc,
blog(LOG_WARNING, "[jim-nvenc] init_specific_encoder failed, "
"trying again without Psycho Visual Tuning");
if (!init_specific_encoder(enc, hevc, settings, encoder, bf,
nv.nvEncDestroyEncoder(enc->session);
enc->session = NULL;
if (!init_session(enc) ||
!init_specific_encoder(enc, hevc, settings, encoder, bf,
false)) {
return false;
}