Skip to content

Commit

Permalink
stream-controller: fix maxNudgeRetry limit not taken into account
Browse files Browse the repository at this point in the history
  • Loading branch information
mangui committed Jan 27, 2017
1 parent 8b4ed6f commit 2105137
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/controller/stream-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -1393,7 +1393,7 @@ _checkBuffer() {
if(nextBufferStart &&
(delta < config.maxSeekHole) &&
(delta > 0)) {
this.nudgeRetry = nudgeRetry++;
this.nudgeRetry = ++nudgeRetry;
const nudgeOffset = nudgeRetry * config.nudgeOffset;
// next buffer is close ! adjust currentTime to nextBufferStart
// this will ensure effective video decoding
Expand All @@ -1412,7 +1412,7 @@ _checkBuffer() {
}
// reset stalled so to rearm watchdog timer
this.stalled = undefined;
this.nudgeRetry = nudgeRetry++;
this.nudgeRetry = ++nudgeRetry;
if (nudgeRetry < config.nudgeMaxRetry) {
const currentTime = media.currentTime;
const targetTime = currentTime + nudgeRetry * config.nudgeOffset;
Expand Down

0 comments on commit 2105137

Please sign in to comment.