From c9ecab444f52b98ef8d9d0799e7f7e93e3f7d9c8 Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Fri, 19 May 2023 18:38:33 +0100 Subject: [PATCH] Use range offset when calculating HLS init map byte ranges --- devine/core/manifests/hls.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devine/core/manifests/hls.py b/devine/core/manifests/hls.py index 6e85f79..85bf8e7 100644 --- a/devine/core/manifests/hls.py +++ b/devine/core/manifests/hls.py @@ -369,8 +369,8 @@ class HLS: segment.init_section.uri = segment.init_section.base_uri + segment.init_section.uri if segment.init_section.byterange: - byte_range = HLS.calculate_byte_range(segment.init_section.byterange) - _ = range_offset.get() + previous_range_offset = range_offset.get() + byte_range = HLS.calculate_byte_range(segment.init_section.byterange, previous_range_offset) range_offset.put(byte_range.split("-")[0]) range_header = { "Range": f"bytes={byte_range}"