mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-03-10 08:29:00 +00:00
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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user