Remove unused code path
The deleted path was only used if resetPosition=false and clearPlaylist=true, which is never the case. PiperOrigin-RevId: 291154550
This commit is contained in:
parent
23f316d67e
commit
454d4add4a
@ -1125,20 +1125,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
|||||||
}
|
}
|
||||||
enabledRenderers = new Renderer[0];
|
enabledRenderers = new Renderer[0];
|
||||||
|
|
||||||
if (resetPosition) {
|
|
||||||
pendingInitialSeekPosition = null;
|
|
||||||
} else if (clearPlaylist) {
|
|
||||||
// When clearing the playlist, also reset the period-based PlaybackInfo position and convert
|
|
||||||
// existing position to initial seek instead.
|
|
||||||
resetPosition = true;
|
|
||||||
if (pendingInitialSeekPosition == null && !playbackInfo.timeline.isEmpty()) {
|
|
||||||
playbackInfo.timeline.getPeriodByUid(playbackInfo.periodId.periodUid, period);
|
|
||||||
long windowPositionUs = playbackInfo.positionUs + period.getPositionInWindowUs();
|
|
||||||
pendingInitialSeekPosition =
|
|
||||||
new SeekPosition(Timeline.EMPTY, period.windowIndex, windowPositionUs);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
queue.clear();
|
queue.clear();
|
||||||
shouldContinueLoading = false;
|
shouldContinueLoading = false;
|
||||||
Timeline timeline = playbackInfo.timeline;
|
Timeline timeline = playbackInfo.timeline;
|
||||||
@ -1155,6 +1141,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
|||||||
long contentPositionUs = playbackInfo.contentPositionUs;
|
long contentPositionUs = playbackInfo.contentPositionUs;
|
||||||
boolean resetTrackInfo = clearPlaylist;
|
boolean resetTrackInfo = clearPlaylist;
|
||||||
if (resetPosition) {
|
if (resetPosition) {
|
||||||
|
pendingInitialSeekPosition = null;
|
||||||
Pair<MediaPeriodId, Long> firstPeriodAndPosition = getDummyFirstMediaPeriodPosition();
|
Pair<MediaPeriodId, Long> firstPeriodAndPosition = getDummyFirstMediaPeriodPosition();
|
||||||
mediaPeriodId = firstPeriodAndPosition.first;
|
mediaPeriodId = firstPeriodAndPosition.first;
|
||||||
startPositionUs = firstPeriodAndPosition.second;
|
startPositionUs = firstPeriodAndPosition.second;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user