Skip to content

Commit

Permalink
fix(HLS): preserve discontinuitySequence in SegmentIndex#fit (shaka-p…
Browse files Browse the repository at this point in the history
…roject#5066)

The `discontinuitySequence` field of the last `SegmentReference` was getting reset to `0` in this function, even if it was originally set to something other than 0. This was causing unnecessary resyncs for the final segment of the video in sequence mode.
  • Loading branch information
swac authored Mar 11, 2023
1 parent d0bb1ba commit 36a15f6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/media/segment_index.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,8 @@ shaka.media.SegmentIndex = class {
lastReference.status,
lastReference.hlsAes128Key,
);
this.references[this.references.length - 1].discontinuitySequence =
lastReference.discontinuitySequence;
}


Expand Down

0 comments on commit 36a15f6

Please sign in to comment.