Skip to content

Commit 3aa73ac

Browse files
authored
Fix a bug that caused the last segment of the last period not to be requested (Dash-Industry-Forum#4642)
1 parent 31de4f6 commit 3aa73ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/dash/utils/SegmentsUtils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ function getSegment(representation, duration, presentationStartTime, mediaStartT
147147
function isSegmentAvailable(timelineConverter, representation, segment, isDynamic) {
148148
const voPeriod = representation.adaptation.period;
149149

150-
// Avoid requesting segments that overlap the period boundary
150+
// Avoid requesting segments that overlap the period boundary for periods that are not the last
151151
if (isFinite(voPeriod.duration) && voPeriod.start + voPeriod.duration <= segment.presentationStartTime) {
152-
return false;
152+
return !isDynamic && voPeriod.nextPeriodId === null;
153153
}
154154

155155
if (isDynamic) {

0 commit comments

Comments
 (0)