Skip to content

Commit

Permalink
unext: fix adaptation-set-switching mismatching
Browse files Browse the repository at this point in the history
  • Loading branch information
unext-wendong committed Sep 11, 2024
1 parent 535ce70 commit b8380e6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packager/mpd/base/period.cc
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,9 @@ std::optional<xml::XmlNode> 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;
}

Expand Down

0 comments on commit b8380e6

Please sign in to comment.