diff --git a/selfdrive/ui/replay/logreader.cc b/selfdrive/ui/replay/logreader.cc index 4dad9f71e02ed9..25f3b399c790e6 100644 --- a/selfdrive/ui/replay/logreader.cc +++ b/selfdrive/ui/replay/logreader.cc @@ -77,7 +77,7 @@ bool LogReader::load(const std::string &file) { } } - // insert custom eidx events for publish frames. + // insert custom EncodeIdx events for publish frames. for (auto cam : ALL_CAMERAS) { for (auto [frame_id, val] : eidx_map[cam]) { auto [e, eidx] = val; diff --git a/selfdrive/ui/replay/replay.cc b/selfdrive/ui/replay/replay.cc index 699457db9d66fe..a153edb86fd816 100644 --- a/selfdrive/ui/replay/replay.cc +++ b/selfdrive/ui/replay/replay.cc @@ -221,7 +221,7 @@ void Replay::stream() { if (evt->which == cereal::Event::ROAD_ENCODE_IDX) { auto idx = evt->event.getRoadEncodeIdx(); auto &seg = segments_[idx.getSegmentNum()]; - if (seg && seg->isLoaded()) { + if (seg && seg->isLoaded() && seg->frames[RoadCam]) { auto &frm = seg->frames[RoadCam]; if (vipc_server == nullptr) { cl_device_id device_id = cl_get_device_id(CL_DEVICE_TYPE_DEFAULT);