ab0670dd by Tadej Novak Committed by David LaPalomento

Don't recalculate the live point if the translated index is the same as length

1 parent 9e0a6d2b
......@@ -1035,7 +1035,7 @@ videojs.Hls.translateMediaIndex = function(mediaIndex, original, update) {
// bitrate switches should be happening here.
translatedMediaIndex = (mediaIndex + (original.mediaSequence - update.mediaSequence));
if (translatedMediaIndex >= update.segments.length || translatedMediaIndex < 0) {
if (translatedMediaIndex > update.segments.length || translatedMediaIndex < 0) {
// recalculate the live point if the streams are too far out of sync
return videojs.Hls.getMediaIndexForLive_(update) + 1;
}
......