Skip to content

Commit

Permalink
fix: only use lastSegmentReference for knowing if variant changed (#7537
Browse files Browse the repository at this point in the history
)

Instead of checking for both lastSegmentReference and
lastInitSegmentReference, we shoould only check lastSegmentReference.

As of #6929, init segment references aren't
cleared on clearBuffer, this onInitSegmentAppended not account for the
safe margin properly.
  • Loading branch information
gkatsev authored Nov 4, 2024
1 parent 0f3b212 commit abfc0b2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/media/streaming_engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -1975,8 +1975,7 @@ shaka.media.StreamingEngine = class {
const MimeUtils = shaka.util.MimeUtils;
const StreamingEngine = shaka.media.StreamingEngine;
const logPrefix = StreamingEngine.logPrefix_(mediaState);
const nullLastReferences = mediaState.lastSegmentReference == null &&
mediaState.lastInitSegmentReference == null;
const nullLastReferences = mediaState.lastSegmentReference == null;

/** @type {!Array.<!Promise>} */
const operations = [];
Expand Down

0 comments on commit abfc0b2

Please sign in to comment.