Skip to content

Commit

Permalink
fix(HLS): preserve discontinuitySequence in SegmentIndex#fit (#5066)
Browse files Browse the repository at this point in the history
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 and joeyparrish committed Apr 26, 2023
1 parent 5ed5413 commit a5a4d3e
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 a5a4d3e

Please sign in to comment.