aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-02-13 23:20:31 +0100
committerdec05eba <dec05eba@protonmail.com>2024-02-13 23:20:31 +0100
commit197af1960994e8be8b05a4e6804cd6607ff3514c (patch)
treea80626cf15f5020b7fe898496d37249ec7913145
parent9a15816b8c1ff0a3b5f6a9d7a22e8aacb468396f (diff)
Reset LIBVA_DRIVER_NAME enviromment variable if its set by the user
-rw-r--r--src/main.cpp4
1 files changed, 4 insertions, 0 deletions
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();