180f73e0 by Tom Johnson

Merge pull request #173 from videojs/hotfix/zero-duration

update for zero duration segment. fixes #172
2 parents b0e8c908 6e8d5532
...@@ -677,7 +677,7 @@ videojs.Hls.getPlaylistDuration = function(playlist, startIndex, endIndex) { ...@@ -677,7 +677,7 @@ videojs.Hls.getPlaylistDuration = function(playlist, startIndex, endIndex) {
677 677
678 for (; i >= startIndex; i--) { 678 for (; i >= startIndex; i--) {
679 segment = playlist.segments[i]; 679 segment = playlist.segments[i];
680 dur += segment.duration || playlist.targetDuration || 0; 680 dur += (segment.duration !== undefined ? segment.duration : playlist.targetDuration) || 0;
681 } 681 }
682 682
683 return dur; 683 return dur;
......