From 11e7bf8f42a76699a7753f9755ca2b97b72e215d Mon Sep 17 00:00:00 2001 From: brandonocasey Date: Wed, 13 Oct 2021 16:28:36 -0400 Subject: [PATCH] fix: always set gopsToAlignWith so it is cleared when we have none --- src/segment-loader.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/segment-loader.js b/src/segment-loader.js index 5d8e5c3ab..911490c47 100644 --- a/src/segment-loader.js +++ b/src/segment-loader.js @@ -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; }