From e855326cffb23f935f56c7411bb79f479a8db9c4 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.4 that did not occur with shaka 3.1.2 #5183 (#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 e5b9072ab6..b80b1b6cb5 100644 --- a/lib/util/periods.js +++ b/lib/util/periods.js @@ -730,7 +730,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;