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; }