obs-qsv11: Set subprocess timeout to 10 sec

(Jim note: Apparently my laptop with two intel GPUs actually took too
long, so I'm giving it another 2 seconds max)
This commit is contained in:
Jim
2022-12-01 18:34:40 -08:00
parent 47f4c18a95
commit ee88776c7e
@@ -82,11 +82,13 @@ static bool get_adapter_caps(IDXGIFactory *factory, uint32_t adapter_idx)
return true;
}
#define CHECK_TIMEOUT_MS 10000
DWORD WINAPI TimeoutThread(LPVOID param)
{
HANDLE hMainThread = (HANDLE)param;
DWORD ret = WaitForSingleObject(hMainThread, 8000);
DWORD ret = WaitForSingleObject(hMainThread, CHECK_TIMEOUT_MS);
if (ret == WAIT_TIMEOUT)
TerminateProcess(GetCurrentProcess(), STATUS_TIMEOUT);