Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 39f5874c authored by Robert Shih's avatar Robert Shih
Browse files

PlaylistFetcher: add lower bound check when starting live streams

Avoid false 'missed the boat' alarms that cause us to queue a bogus
discontinuity before even starting.

Bug: 17303166
Change-Id: I5003934fc695f30db2df9a0803b8fe960d77a458
parent 01b9256a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -754,6 +754,9 @@ void PlaylistFetcher::onDownloadNext() {
            if (!mPlaylist->isComplete() && !mPlaylist->isEvent()) {
                // If this is a live session, start 3 segments from the end on connect
                mSeqNumber = lastSeqNumberInPlaylist - 3;
                if (mSeqNumber < firstSeqNumberInPlaylist) {
                    mSeqNumber = firstSeqNumberInPlaylist;
                }
            } else {
                mSeqNumber = getSeqNumberForTime(mStartTimeUs);
                mStartTimeUs -= getSegmentStartTimeUs(mSeqNumber);