Skip to content

Commit

Permalink
fix(HLS): Mark first partial segment as independent always (shaka-pro…
Browse files Browse the repository at this point in the history
  • Loading branch information
avelad committed Jun 20, 2023
1 parent e9ba2f4 commit ea896d5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/hls/hls_parser.js
Expand Up @@ -2915,7 +2915,11 @@ shaka.hls.HlsParser = class {
if (item.name == 'EXT-X-PRELOAD-HINT') {
partial.markAsPreload();
}
if (item.getAttributeValue('INDEPENDENT') != 'YES') {
// The spec doesn't say that we can assume INDEPENDENT=YES for the
// first partial segment. It does call the flag "optional", though, and
// that cases where there are no such flags on any partial segments, it
// is sensible to assume the first one is independent.
if (item.getAttributeValue('INDEPENDENT') != 'YES' && i > 0) {
partial.markAsNonIndependent();
}
partialSegmentRefs.push(partial);
Expand Down

0 comments on commit ea896d5

Please sign in to comment.