4e0ea0a2 by Tom Johnson

update for zero duration segment. fixes #172

1 parent b0e8c908
...@@ -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;
......