From b8380e64f0a239731fe67722caf0a277f69da7ac Mon Sep 17 00:00:00 2001 From: Wendong Li Date: Wed, 11 Sep 2024 20:02:00 +0900 Subject: [PATCH] unext: fix adaptation-set-switching mismatching See: https://github.com/shaka-project/shaka-packager/issues/1402 --- packager/mpd/base/period.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packager/mpd/base/period.cc b/packager/mpd/base/period.cc index 0809bcb3f8..77a33b54da 100644 --- a/packager/mpd/base/period.cc +++ b/packager/mpd/base/period.cc @@ -145,12 +145,9 @@ std::optional Period::GetXml(bool output_period_duration) { } // Iterate thru AdaptationSets and add them to one big Period element. - // Also force AdaptationSets Id to incremental order, which might not - // be the case if force_cl_index is used. - int idx = 0; for (const auto& adaptation_set : adaptation_sets_) { auto child = adaptation_set->GetXml(); - if (!child || !child->SetId(idx++) || !period.AddChild(std::move(*child))) + if (!child || !period.AddChild(std::move(*child))) return std::nullopt; }