diff --git a/lib/fles_core/TimesliceAnalyzer.cpp b/lib/fles_core/TimesliceAnalyzer.cpp index aa9f00bde..1c2a1487f 100644 --- a/lib/fles_core/TimesliceAnalyzer.cpp +++ b/lib/fles_core/TimesliceAnalyzer.cpp @@ -103,6 +103,10 @@ bool TimesliceAnalyzer::check_timeslice(const fles::Timeslice& ts) return false; } + uint64_t first_component_start_time = 0; + if (ts.num_microslices(0) != 0) { + first_component_start_time = ts.get_microslice(0, 0).desc().idx; + } for (size_t c = 0; c < ts.num_components(); ++c) { if (ts.num_microslices(c) == 0) { out_ << "no microslices in timeslice " << ts.index() @@ -110,6 +114,19 @@ bool TimesliceAnalyzer::check_timeslice(const fles::Timeslice& ts) ++timeslice_error_count_; return false; } + // ensure all components start with same time + uint64_t component_start_time = ts.get_microslice(c, 0).desc().idx; + if (component_start_time != first_component_start_time) { + out_ << "start time missmatch in timeslice " << ts.index() + << ", component " << c << ", start time " + << component_start_time << ", offset to c0 " + << static_cast(first_component_start_time - + component_start_time) + << std::endl; + ++timeslice_error_count_; + return false; + } + // checke all microslices of component pattern_checkers_.at(c)->reset(); for (size_t m = 0; m < ts.num_microslices(c); ++m) { bool success =