fix(dash): handle high startNumber in SegmentTimeline for DVR manifests

When a DASH manifest has a high startNumber (common in DVR/catch-up content from live streams), the segment range calculation would produce an empty range because end_number was set to len(segment_durations) rather than being offset by startNumber.
This commit is contained in:
Andy
2026-02-01 11:12:29 -07:00
parent d0d8044fb3
commit 6dd1ce6df9

View File

@@ -372,6 +372,9 @@ class DASH:
if not end_number:
end_number = len(segment_durations)
# Handle high startNumber in DVR/catch-up manifests where startNumber > segment count
if start_number > end_number:
end_number = start_number + len(segment_durations) - 1
for t, n in zip(segment_durations, range(start_number, end_number + 1)):
segments.append(