فهرست منبع

obs-ffmpeg: Fix when NVENC retries without psycho aq

In obsproject/obs-studio#6963, a crash was fixed when retrying NVENC
without psycho aq. Unfortunately, the code forgot to reinitialize the
session, and thus the retry always failed. This reinitializes the
session as it was likely meant to.
jp9000 3 سال پیش
والد
کامیت
3df0c61c8c
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      plugins/obs-ffmpeg/jim-nvenc.c

+ 3 - 0
plugins/obs-ffmpeg/jim-nvenc.c

@@ -879,6 +879,9 @@ static bool init_encoder(struct nvenc_data *enc, enum codec_type codec,
 		nv.nvEncDestroyEncoder(enc->session);
 		enc->session = NULL;
 
+		if (!init_session(enc)) {
+			return false;
+		}
 		if (!init_specific_encoder(enc, settings, bf, false)) {
 			return false;
 		}