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.
swac authored Mar 11, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
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
@@ -363,6 +363,8 @@ shaka.media.SegmentIndex = class {
lastReference.status,
lastReference.hlsAes128Key,
);
this.references[this.references.length - 1].discontinuitySequence =
lastReference.discontinuitySequence;
}


0 comments on commit 36a15f6

Please sign in to comment.