Skip to content

Commit

Permalink
fix(HLS): Skip EXT-X-PRELOAD-HINT without full byterange info (#5294)
Browse files Browse the repository at this point in the history
Fixes #5089
  • Loading branch information
avelad authored and joeyparrish committed Jun 20, 2023
1 parent ee61849 commit 9e193e2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/hls/manifest_text_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,15 @@ shaka.hls.ManifestTextParser = class {
partialSegmentTags.push(tag);
} else if (tag.name == 'EXT-X-PRELOAD-HINT') {
if (tag.getAttributeValue('TYPE') == 'PART') {
partialSegmentTags.push(tag);
// Note: BYTERANGE-START without BYTERANGE-LENGTH is being
// ignored.
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');
Expand Down

0 comments on commit 9e193e2

Please sign in to comment.