From eb01efe0cb9c7a83fcfb052faa8971e9468e3e8c Mon Sep 17 00:00:00 2001 From: Quantum Date: Sun, 11 Jul 2021 03:36:27 -0400 Subject: [PATCH] [host] nvfbc: do not crash when protected content is playing We return a timeout, so that when protected content finishes playing, we can immediately resume capture. --- host/platform/Windows/capture/NVFBC/src/wrapper.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/host/platform/Windows/capture/NVFBC/src/wrapper.cpp b/host/platform/Windows/capture/NVFBC/src/wrapper.cpp index 26c07d74..f8eab447 100644 --- a/host/platform/Windows/capture/NVFBC/src/wrapper.cpp +++ b/host/platform/Windows/capture/NVFBC/src/wrapper.cpp @@ -253,6 +253,11 @@ CaptureResult NvFBCToSysCapture( handle->retry = 0; break; + case NVFBC_ERROR_PROTECTED_CONTENT: + DEBUG_WARN("Protected content is playing, can't capture"); + Sleep(100); + return CAPTURE_RESULT_TIMEOUT; + case NVFBC_ERROR_INVALID_PARAM: if (handle->retry < 2) {