From 3aa73ac414f16beed0d8f1ae071ab9590adc821a Mon Sep 17 00:00:00 2001 From: Daniel Silhavy Date: Fri, 6 Dec 2024 17:06:24 +0100 Subject: [PATCH] Fix a bug that caused the last segment of the last period not to be requested (#4642) --- src/dash/utils/SegmentsUtils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dash/utils/SegmentsUtils.js b/src/dash/utils/SegmentsUtils.js index ace0ce30b0..499712b154 100644 --- a/src/dash/utils/SegmentsUtils.js +++ b/src/dash/utils/SegmentsUtils.js @@ -147,9 +147,9 @@ function getSegment(representation, duration, presentationStartTime, mediaStartT function isSegmentAvailable(timelineConverter, representation, segment, isDynamic) { const voPeriod = representation.adaptation.period; - // Avoid requesting segments that overlap the period boundary + // Avoid requesting segments that overlap the period boundary for periods that are not the last if (isFinite(voPeriod.duration) && voPeriod.start + voPeriod.duration <= segment.presentationStartTime) { - return false; + return !isDynamic && voPeriod.nextPeriodId === null; } if (isDynamic) {