From 6dd1ce6df9b085a20a384f3349463618b2ea7379 Mon Sep 17 00:00:00 2001 From: Andy Date: Sun, 1 Feb 2026 11:12:29 -0700 Subject: [PATCH] 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. --- unshackle/core/manifests/dash.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/unshackle/core/manifests/dash.py b/unshackle/core/manifests/dash.py index 3e7913b..a2c92a3 100644 --- a/unshackle/core/manifests/dash.py +++ b/unshackle/core/manifests/dash.py @@ -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(