From 9f957514f339e488c8d937f27626b501cfb50ac3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?A=CC=81lvaro=20Velad=20Galva=CC=81n?= Date: Wed, 26 Jun 2024 11:25:11 +0200 Subject: [PATCH] fix(HLS): Fix getAvailableSegment_ function --- lib/hls/hls_parser.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/hls/hls_parser.js b/lib/hls/hls_parser.js index 39ad60291a..aec328dc34 100644 --- a/lib/hls/hls_parser.js +++ b/lib/hls/hls_parser.js @@ -4167,8 +4167,8 @@ shaka.hls.HlsParser = class { let segmentIndex = this.isLive_() ? Math.trunc((segments.length - 1) / 2) : 0; let segment = segments[segmentIndex]; - while (segment.status == shaka.media.SegmentReference.Status.MISSING && - segmentIndex < segments.length) { + while (segment.getStatus() == shaka.media.SegmentReference.Status.MISSING && + (segmentIndex + 1) < segments.length) { segmentIndex ++; segment = segments[segmentIndex]; }