Skip to content

Commit

Permalink
[HLSTree] Ensure repr baseurl is set between periods
Browse files Browse the repository at this point in the history
  • Loading branch information
CastagnaIT committed Aug 26, 2023
1 parent c189dba commit a16815f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/parser/HLSTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,11 +489,17 @@ PLAYLIST::PrepareRepStatus adaptive::CHLSTree::prepareRepresentation(PLAYLIST::C
m_periods.push_back(std::move(newPeriod));
}
else
{
// Period(s) already created by a previously downloaded manifest child
period = m_periods[discontCount].get();
}

newStartNumber += rep->SegmentTimeline().GetSize();
adp = period->GetAdaptationSets()[adpSetPos].get();
rep = adp->GetRepresentations()[reprPos].get();
// When we switch to a repr of another period we need to set current base url
CRepresentation* switchRep = adp->GetRepresentations()[reprPos].get();
switchRep->SetBaseUrl(rep->GetBaseUrl());
rep = switchRep;

currentSegStartPts = 0;

Expand Down

0 comments on commit a16815f

Please sign in to comment.