Skip to content

Commit

Permalink
playlist-loader : discard fragment with invalid duration
Browse files Browse the repository at this point in the history
  • Loading branch information
mangui committed Oct 12, 2015
1 parent e0a82f1 commit 41d6feb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/loader/playlist-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,10 @@ class PlaylistLoader {
break;
case 'INF':
var duration = parseFloat(result[1]);
level.fragments.push({url: this.resolve(result[2], baseurl), duration: duration, start: totalduration, sn: currentSN++, level: id, cc: cc});
totalduration += duration;
if (!isNaN(duration)) {
level.fragments.push({url: this.resolve(result[2], baseurl), duration: duration, start: totalduration, sn: currentSN++, level: id, cc: cc});
totalduration += duration;
}
break;
default:
break;
Expand Down

0 comments on commit 41d6feb

Please sign in to comment.