From f5d120935f2581b601b3981e532dc730fd173093 Mon Sep 17 00:00:00 2001 From: Adam Waldron Date: Tue, 2 Apr 2024 16:28:26 -0700 Subject: [PATCH] fix: llHLS does not need forcedTimestampOffset (#1501) * fix: llHLS does not need forcedTimestampOffset * more readable boolean --- src/segment-loader.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/segment-loader.js b/src/segment-loader.js index d4a0bcb1d..c761d157e 100644 --- a/src/segment-loader.js +++ b/src/segment-loader.js @@ -1238,8 +1238,11 @@ bufferedEnd: ${lastBufferedEnd(this.buffered_())} this.syncPoint_ = null; this.isPendingTimestampOffset_ = false; // this is mainly to sync timing-info when switching between renditions with and without timestamp-rollover, - // so we don't want it for DASH - if (this.sourceType_ === 'hls') { + // so we don't want it for DASH or fragmented mp4 segments. + const isFmp4 = this.currentMediaInfo_ && this.currentMediaInfo_.isFmp4; + const isHlsTs = this.sourceType_ === 'hls' && !isFmp4; + + if (isHlsTs) { this.shouldForceTimestampOffsetAfterResync_ = true; } this.callQueue_ = [];