diff --git a/lib/hls/hls_parser.js b/lib/hls/hls_parser.js index c8e26ce720..e0037d7844 100644 --- a/lib/hls/hls_parser.js +++ b/lib/hls/hls_parser.js @@ -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);