Commit 882fb18b authored by Thiago Santini's avatar Thiago Santini

Enables uvc_close call for other non-windows platforms

Differently from Windows, this call seems to work
appropriately for Linux.
Enabling it resolves the issue of the device handle
being busy when trying to reopen the same handle.
parent acc3ad56
...@@ -112,11 +112,17 @@ bool UVCCameraSession::unload() ...@@ -112,11 +112,17 @@ bool UVCCameraSession::unload()
if (streaming) if (streaming)
stopPreview(); stopPreview();
#ifdef _WIN32
// TODO: closing here seems to mess up the device // TODO: closing here seems to mess up the device
//if (devh) //if (devh)
// uvc_close(devh); // uvc_close(devh);
//devh = NULL; //devh = NULL;
#else
// For linux it seems to work as expected
if (devh)
uvc_close(devh);
devh = NULL;
#endif
m_supportedViewfinderSettings.clear(); m_supportedViewfinderSettings.clear();
return true; return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment