From a180b282688470c451d1b4156027bad43abaeb95 Mon Sep 17 00:00:00 2001 From: Aidan Ridley Date: Wed, 26 Apr 2023 17:18:14 -0600 Subject: [PATCH] fix: PERIOD_FLATTENING_FAILED error with shaka 4.3.x that did not occur with shaka 3.1.2 (#5188) Fixed handling of manifest with new codecs in later periods by adding check for empty matchedStreams array in createNewOutputStrems() Fixes #5183 --- lib/util/periods.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util/periods.js b/lib/util/periods.js index 40559a2336..4d9ba851b2 100644 --- a/lib/util/periods.js +++ b/lib/util/periods.js @@ -728,7 +728,7 @@ shaka.util.PeriodCombiner = class { // in advance. concat() will add them to the output's MetaSegmentIndex. } - if (!outputStream.matchedStreams) { + if (!outputStream.matchedStreams || !outputStream.matchedStreams.length) { // This is not a stream we can build output from, but it may become part // of another output based on another period's stream. return null;