Skip to content

Commit

Permalink
fix: always set gopsToAlignWith so it is cleared when we have none
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonocasey committed Oct 13, 2021
1 parent 14b8a7b commit 11e7bf8
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/segment-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -1516,15 +1516,13 @@ export default class SegmentLoader extends videojs.EventTarget {
segmentInfo.audioAppendStart = audioBufferedEnd - this.sourceUpdater_.audioTimestampOffset();
}

if (this.sourceUpdater_.videoBuffered().length) {
segmentInfo.gopsToAlignWith = gopsSafeToAlignWith(
this.gopBuffer_,
// since the transmuxer is using the actual timing values, but the time is
// adjusted by the timestmap offset, we must adjust the value here
this.currentTime_() - this.sourceUpdater_.videoTimestampOffset(),
this.timeMapping_
);
}
segmentInfo.gopsToAlignWith = gopsSafeToAlignWith(
this.gopBuffer_,
// since the transmuxer is using the actual timing values, but the time is
// adjusted by the timestmap offset, we must adjust the value here
this.currentTime_() - this.sourceUpdater_.videoTimestampOffset(),
this.timeMapping_
);

return segmentInfo;
}
Expand Down

0 comments on commit 11e7bf8

Please sign in to comment.