diff --git a/src/modules/replay/replay_main.cpp b/src/modules/replay/replay_main.cpp index 11e990e4be..6a3d8fb941 100644 --- a/src/modules/replay/replay_main.cpp +++ b/src/modules/replay/replay_main.cpp @@ -690,8 +690,8 @@ void Replay::task_main() //wait if necessary const uint64_t publish_timestamp = next_file_time + timestamp_offset; uint64_t cur_time = hrt_absolute_time(); - - if (cur_time < publish_timestamp) { + // if some topics have a timestamp smaller than the log file start, publish them immediately + if (cur_time < publish_timestamp && next_file_time > _file_start_time) { usleep(publish_timestamp - cur_time); }