Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/controller/gap-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -582,8 +582,9 @@ export default class GapController extends TaskLoop {
let pos = appended.end;
while (pos < startTime) {
const provisioned = appendedFragAtPosition(pos, fragmentTracker);
if (provisioned) {
pos += provisioned.duration;
const duration = provisioned ? provisioned.duration : 0;
if (duration > 0) {
pos += duration;
} else {
moreToLoad = true;
break;
Expand Down
4 changes: 2 additions & 2 deletions src/remux/passthrough-remuxer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -394,10 +394,10 @@ function isInvalidInitPts(
if (initPTS === null) {
return true;
}
// InitPTS is invalid when distance from program would be more than segment duration or a minimum of one second
// InitPTS is invalid when distance from program would be more than or equal to segment duration or a minimum of one second
const minDuration = Math.max(duration, 1);
const startTime = startDTS - initPTS.baseTime / initPTS.timescale;
return Math.abs(startTime - timeOffset) > minDuration;
return Math.abs(startTime - timeOffset) >= minDuration;
}

function getParsedTrackCodec(
Expand Down
Loading