Skip to content

Commit

Permalink
Remove check in getValidTimeAheadOfTargetTime that caused stall in st… (
Browse files Browse the repository at this point in the history
Dash-Industry-Forum#4025)

* Remove check in getValidTimeAheadOfTargetTime that caused stall in stream with gaps in previous period and upcoming period
  • Loading branch information
dsilhavy authored Aug 12, 2022
1 parent d970936 commit 91db0fa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/dash/DashHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -439,12 +439,11 @@ function DashHandler(config) {
const requestEndTime = targetRequest.startTime + targetRequest.duration;

// Keep the original start time in case it is covered by a segment
if (time >= targetRequest.startTime && requestEndTime - time > targetThreshold) {
if (time > targetRequest.startTime && requestEndTime - time > targetThreshold) {
return time;
}

// If target time is before the start of the request use request starttime
if (time < targetRequest.startTime) {
if (!isNaN(targetRequest.startTime) && time < targetRequest.startTime && adjustedTime > targetRequest.startTime) {
return targetRequest.startTime;
}

Expand Down

0 comments on commit 91db0fa

Please sign in to comment.