diff --git a/src/device/device.cc b/src/device/device.cc index f7929cb..930d09a 100644 --- a/src/device/device.cc +++ b/src/device/device.cc @@ -268,8 +268,10 @@ void Device::Stop(const Source &source) { } else if (source == Source::MOTION_TRACKING) { StopMotionTracking(); } else if (source == Source::ALL) { - Stop(Source::VIDEO_STREAMING); Stop(Source::MOTION_TRACKING); + // Must stop motion tracking before video streaming and sleep a moment here + std::this_thread::sleep_for(std::chrono::milliseconds(10)); + Stop(Source::VIDEO_STREAMING); } else { LOG(FATAL) << "Unsupported source :("; }