Commit b0d98a2e by tonihei Committed by Oliver Woodman

Find correct next chunk if previous one didn't finish loading.

If the previous chunk didn't finish loading, we need to find the appropriate
next chunk based on the current loading position (or the previous chunk's
start time if not independent).

PiperOrigin-RevId: 315658435
parent b0457da0
......@@ -505,9 +505,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
/* stayInBounds= */ !playlistTracker.isLive() || previous == null)
+ mediaPlaylist.mediaSequence;
}
// We ignore the case of previous not having loaded completely, in which case we load the next
// segment.
return previous.getNextChunkIndex();
return previous.isLoadCompleted() ? previous.getNextChunkIndex() : previous.chunkIndex;
}
private long resolveTimeToLiveEdgeUs(long playbackPositionUs) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment