From 197af1960994e8be8b05a4e6804cd6607ff3514c Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 13 Feb 2024 23:20:31 +0100 Subject: Reset LIBVA_DRIVER_NAME enviromment variable if its set by the user --- src/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 7277b11..f04b1af 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1587,6 +1587,10 @@ int main(int argc, char **argv) { // Stop nvidia driver from buffering frames setenv("__GL_MaxFramesAllowed", "1", true); + // Some people set this to nvidia (for nvdec) or vdpau (for nvidia vdpau), which breaks gpu screen recorder since + // nvidia doesn't support vaapi and nvidia-vaapi-driver doesn't support encoding yet. + // Let vaapi find the match vaapi driver instead of forcing a specific one. + setenv("LIBVA_DRIVER_NAME", "", true); if(argc <= 1) usage_full(); -- cgit v1.2.3