From ea86ddd167d40b8670db3fba98a7ea9b4f996f60 Mon Sep 17 00:00:00 2001 From: John Zhao Date: Sat, 14 Apr 2018 22:28:43 +0800 Subject: [PATCH] Fix restart fail issue --- src/device/device.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 :("; }