diff --git a/selfdrive/ui/replay/filereader.cc b/selfdrive/ui/replay/filereader.cc index 1585631401..5cb3b116a2 100644 --- a/selfdrive/ui/replay/filereader.cc +++ b/selfdrive/ui/replay/filereader.cc @@ -18,7 +18,7 @@ std::string cacheFilePath(const std::string &url) { return comma_cache.back() == '/' ? comma_cache : comma_cache + "/"; }(); - return cache_path + sha256(getUrlWithoutQuery(url));; + return cache_path + sha256(getUrlWithoutQuery(url)); } std::string FileReader::read(const std::string &file, std::atomic *abort) { diff --git a/selfdrive/ui/replay/framereader.cc b/selfdrive/ui/replay/framereader.cc index b6092a0df9..215414ec9c 100644 --- a/selfdrive/ui/replay/framereader.cc +++ b/selfdrive/ui/replay/framereader.cc @@ -44,7 +44,6 @@ FrameReader::FrameReader(bool local_cache, int chunk_size, int retries) : FileRe av_frame_ = av_frame_alloc(); rgb_frame_ = av_frame_alloc(); yuv_frame_ = av_frame_alloc();; - } FrameReader::~FrameReader() { diff --git a/selfdrive/ui/replay/replay.cc b/selfdrive/ui/replay/replay.cc index 5b17fd5e4a..019c2b3556 100644 --- a/selfdrive/ui/replay/replay.cc +++ b/selfdrive/ui/replay/replay.cc @@ -41,15 +41,16 @@ Replay::~Replay() { } void Replay::stop() { - if (stream_thread_ == nullptr) return; + if (!stream_thread_ && segments_.empty()) return; qDebug() << "shutdown: in progress..."; - exit_ = updating_events_ = true; - stream_cv_.notify_one(); - stream_thread_->quit(); - stream_thread_->wait(); - stream_thread_ = nullptr; - + if (stream_thread_ != nullptr) { + exit_ = updating_events_ = true; + stream_cv_.notify_one(); + stream_thread_->quit(); + stream_thread_->wait(); + stream_thread_ = nullptr; + } segments_.clear(); camera_server_.reset(nullptr); qDebug() << "shutdown: done";