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
This commit is contained in:
parent
3e9a45b9d3
commit
9441f72445
@ -1321,7 +1321,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
|||||||
if (!queue.updateQueuedPeriods(rendererPositionUs, getMaxRendererReadPositionUs())) {
|
if (!queue.updateQueuedPeriods(rendererPositionUs, getMaxRendererReadPositionUs())) {
|
||||||
seekToCurrentPosition(/* sendDiscontinuity= */ false);
|
seekToCurrentPosition(/* sendDiscontinuity= */ false);
|
||||||
}
|
}
|
||||||
handleLoadingMediaPeriodChanged(/* loadingTrackSelectionChanged= */ false);
|
|
||||||
} else {
|
} else {
|
||||||
// Something changed. Seek to new start position.
|
// Something changed. Seek to new start position.
|
||||||
MediaPeriodHolder periodHolder = queue.getFrontPeriod();
|
MediaPeriodHolder periodHolder = queue.getFrontPeriod();
|
||||||
@ -1341,6 +1340,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
|||||||
playbackInfo.copyWithNewPosition(
|
playbackInfo.copyWithNewPosition(
|
||||||
newPeriodId, seekedToPositionUs, newContentPositionUs, getTotalBufferedDurationUs());
|
newPeriodId, seekedToPositionUs, newContentPositionUs, getTotalBufferedDurationUs());
|
||||||
}
|
}
|
||||||
|
handleLoadingMediaPeriodChanged(/* loadingTrackSelectionChanged= */ false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private long getMaxRendererReadPositionUs() {
|
private long getMaxRendererReadPositionUs() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user