diff options
Diffstat (limited to 'video-ps3eye/module.cpp')
-rw-r--r-- | video-ps3eye/module.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/video-ps3eye/module.cpp b/video-ps3eye/module.cpp index a7078180..cdc06974 100644 --- a/video-ps3eye/module.cpp +++ b/video-ps3eye/module.cpp @@ -132,6 +132,11 @@ void ps3eye_camera::stop() if (wrapper.state() != QProcess::NotRunning) { + volatile auto& ptr = *(ps3eye::shm*)shm.ptr(); + ptr.in.do_exit = 1; + std::atomic_thread_fence(std::memory_order_seq_cst); + wrapper.waitForFinished(5000); + if (wrapper.state() != QProcess::NotRunning) wrapper.kill(); wrapper.waitForFinished(1000); |