Skip to content

Commit

Permalink
[HLSTree] Fix misaligned periods update for VOD
Browse files Browse the repository at this point in the history
  • Loading branch information
CastagnaIT committed Nov 1, 2024
1 parent b2edd07 commit a40b7be
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/parser/HLSTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,14 @@ bool adaptive::CHLSTree::ProcessChildManifest(PLAYLIST::CPeriod* period,
size_t adpSetPos = GetPtrPosition(period->GetAdaptationSets(), adp);
size_t reprPos = GetPtrPosition(adp->GetRepresentations(), rep);

if (!m_isLive)
{
// VOD streaming must be updated always from the first period
period = m_periods[0].get();
adp = period->GetAdaptationSets()[adpSetPos].get();
rep = adp->GetRepresentations()[reprPos].get();
}

rep->SetBaseUrl(sourceUrl);

EncryptionType currentEncryptionType = EncryptionType::NONE;
Expand Down

0 comments on commit a40b7be

Please sign in to comment.