Fix restart fail issue

This commit is contained in:
John Zhao 2018-04-14 22:28:43 +08:00
parent 2017d648c3
commit ea86ddd167

View File

@ -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 :(";
}