Fix recording freeze on nvidia when __GL_SYNC_TO_VBLANK is set to 1

This commit is contained in:
dec05eba
2024-05-30 01:26:25 +02:00
parent fe690fa38a
commit 0d558a36af

View File

@@ -1659,6 +1659,10 @@ int main(int argc, char **argv) {
// 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.
unsetenv("LIBVA_DRIVER_NAME");
// Some people set this to force all applications to vsync on nvidia, but this makes eglSwapBuffers never return.
unsetenv("__GL_SYNC_TO_VBLANK");
// Same as above, but for amd/intel
unsetenv("vblank_mode");
if(argc <= 1)
usage_full();