diff --git a/libsrc/grabber/dda/DDAGrabber.cpp b/libsrc/grabber/dda/DDAGrabber.cpp index aea46046..6be4d40a 100644 --- a/libsrc/grabber/dda/DDAGrabber.cpp +++ b/libsrc/grabber/dda/DDAGrabber.cpp @@ -174,7 +174,7 @@ int DDAGrabber::grabFrame(Image &image) // Acquire the next frame. CComPtr desktopResource; DXGI_OUTDUPL_FRAME_INFO frameInfo; - hr = d->desktopDuplication->AcquireNextFrame(INFINITE, &frameInfo, &desktopResource); + hr = d->desktopDuplication->AcquireNextFrame(500, &frameInfo, &desktopResource); if (hr == DXGI_ERROR_ACCESS_LOST || hr == DXGI_ERROR_INVALID_CALL) { if (!restartCapture()) @@ -185,7 +185,7 @@ int DDAGrabber::grabFrame(Image &image) } if (hr == DXGI_ERROR_WAIT_TIMEOUT) { - // This shouldn't happen since we specified an INFINITE timeout. + // Nothing changed on the screen in the 500ms we waited. return 0; } RETURN_IF_ERROR(hr, "Failed to acquire next frame", 0);