From 529f1b84f8a2c665a4442f72ec16aa86fbd8cc77 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 3 Mar 2024 18:37:06 -0600 Subject: [PATCH] Fix CUDA context leak causing encoder init failures using X11 capture with NVENC --- CHANGELOG.md | 3 ++- src/platform/linux/cuda.cu | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 037395640fa..5f8290545da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,7 +50,7 @@ - (Capture/Linux) Fix missing mouse cursor when using KMS capture on a GPU with hardware cursor support - (Capture/Windows) Add workaround for Nvidia driver bug causing Sunshine to crash when RTX HDR is globally enabled - (Capture/Windows) Add workaround for AMD driver bug on pre-RDNA GPUs causing hardware encoding failure -- (Capture/Windows) Reintroduce support for encoding on older Nvidia GPU drivers (v456.71-v522.25) +- (Capture/Windows) Reintroduce support for NVENC on older Nvidia GPU drivers (v456.71-v522.25) - (Capture/Windows) Fix encoding on old Intel GPUs that don't support low-power H.264 encoding - (Capture/Linux) Fix GL errors or corrupt video output on GPUs that use aux planes such as Intel Arc - (Capture/Linux) Fix GL errors or corrupt video output on GPUs that use DRM modifiers on YUV buffers @@ -68,6 +68,7 @@ - (Capture/Windows) Fix delay displaying UAC dialogs when the mouse cursor is not moving - (Capture/Linux) Fix corrupt video output or stream disconnections if the display resolution changes while streaming - (Capture/Linux) Fix color of aspect ratio padding in the capture image with VAAPI +- (Capture/Linux) Fix NVENC initialization error when using X11 capture with some GPUs - (Tray/Linux) Fix random crash when the tray icon is updating - (Network) Fix QoS tagging when running in IPv4+IPv6 mode - (Process) Fix termination of child processes upon app quit when the parent has already terminated diff --git a/src/platform/linux/cuda.cu b/src/platform/linux/cuda.cu index 863e3f944fe..8fb1a5ee2d6 100644 --- a/src/platform/linux/cuda.cu +++ b/src/platform/linux/cuda.cu @@ -222,7 +222,7 @@ std::optional tex_t::make(int height, int pitch) { return tex; } -tex_t::tex_t() : array {}, texture { INVALID_TEXTURE } {} +tex_t::tex_t() : array {}, texture { INVALID_TEXTURE, INVALID_TEXTURE } {} tex_t::tex_t(tex_t &&other) : array { other.array }, texture { other.texture } { other.array = 0; other.texture.point = INVALID_TEXTURE;