From 9b255e0555e31b9ae67e955eb61e4d15acc279ed Mon Sep 17 00:00:00 2001 From: Alvaro Velad Galvan Date: Tue, 13 Jun 2023 13:37:09 +0200 Subject: [PATCH] fix(HLS): Skip EXT-X-PRELOAD-HINT without full byterange info --- lib/hls/manifest_text_parser.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/hls/manifest_text_parser.js b/lib/hls/manifest_text_parser.js index b37cc99949..8782061519 100644 --- a/lib/hls/manifest_text_parser.js +++ b/lib/hls/manifest_text_parser.js @@ -158,7 +158,13 @@ shaka.hls.ManifestTextParser = class { partialSegmentTags.push(tag); } else if (tag.name == 'EXT-X-PRELOAD-HINT') { if (tag.getAttributeValue('TYPE') == 'PART') { - partialSegmentTags.push(tag); + if (tag.getAttributeValue('BYTERANGE-START') != null) { + if (tag.getAttributeValue('BYTERANGE-LENGTH') != null) { + partialSegmentTags.push(tag); + } + } else { + partialSegmentTags.push(tag); + } } else if (tag.getAttributeValue('TYPE') == 'MAP') { // Rename the Preload Hint tag to be a Map tag. tag.setName('EXT-X-MAP');