Skip to content

Commit

Permalink
Merge pull request #1621 from CastagnaIT/islastseg_omega
Browse files Browse the repository at this point in the history
[backport][AdaptiveTree] IsLastSegment return false if period is the last one
  • Loading branch information
CastagnaIT authored Aug 3, 2024
2 parents 208b998 + 10784ff commit 007222a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/common/AdaptiveTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ namespace adaptive

if (IsLive())
{
// Assume that if the period is the last, it never ends until segments can no longer be downloaded
if (m_periods.back().get() == segPeriod)
return false;

if (segPeriod->GetDuration() > 0 && segPeriod->GetStart() != NO_VALUE)
{
const uint64_t pDurMs = segPeriod->GetDuration() * 1000 / segPeriod->GetTimescale();
Expand Down

0 comments on commit 007222a

Please sign in to comment.