Commit 3d6407a5 by tonihei Committed by Oliver Woodman

Always update loading period in handleSourceInfoRefreshed.

This ensures we keep the loading period in sync with the the playing period in
PlybackInfo, when the latter changes to something new.

PiperOrigin-RevId: 244838123
parent b4b82f5b
......@@ -1321,7 +1321,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
if (!queue.updateQueuedPeriods(rendererPositionUs, getMaxRendererReadPositionUs())) {
seekToCurrentPosition(/* sendDiscontinuity= */ false);
}
handleLoadingMediaPeriodChanged(/* loadingTrackSelectionChanged= */ false);
} else {
// Something changed. Seek to new start position.
MediaPeriodHolder periodHolder = queue.getFrontPeriod();
......@@ -1341,6 +1340,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
playbackInfo.copyWithNewPosition(
newPeriodId, seekedToPositionUs, newContentPositionUs, getTotalBufferedDurationUs());
}
handleLoadingMediaPeriodChanged(/* loadingTrackSelectionChanged= */ false);
}
private long getMaxRendererReadPositionUs() {
......
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