fix thinko when searching for a segment descriptor by TimelineRange

This commit is contained in:
Paul Davis 2025-10-20 12:50:31 -06:00
parent b460ce6d6a
commit 12f40234ef

View file

@ -546,10 +546,9 @@ Source::get_segment_descriptor (TimelineRange const & range, SegmentDescriptor&
/* Note: since we disallow overlapping segments, any overlap between /* Note: since we disallow overlapping segments, any overlap between
the @p range and an existing segment counts as a match. the @p range and an existing segment counts as a match.
*/ */
for (auto const & sd : segment_descriptors) { for (auto const & sd : segment_descriptors) {
if (coverage_exclusive_ends (sd.position(), sd.position() + sd.extent(), if (coverage_exclusive_ends (sd.position(), sd.position() + sd.extent(),
segment.position(), segment.position() + segment.extent()) != Temporal::OverlapNone) { range.start(), range.end()) != Temporal::OverlapNone) {
segment = sd; segment = sd;
return true; return true;
} }