mirror of
https://github.com/androidx/media.git
synced 2025-05-07 23:50:44 +08:00
Don't ignore first period when updating information to new Timeline.
This while loop started with the second period in the queue and the first one was always ignored. PiperOrigin-RevId: 297812937
This commit is contained in:
parent
91a87b3fa0
commit
28cefe12c5
@ -1552,14 +1552,12 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
} else if (!timeline.isEmpty()) {
|
||||
// Something changed. Seek to new start position.
|
||||
@Nullable MediaPeriodHolder periodHolder = queue.getPlayingPeriod();
|
||||
if (periodHolder != null) {
|
||||
while (periodHolder != null) {
|
||||
// Update the new playing media period info if it already exists.
|
||||
while (periodHolder.getNext() != null) {
|
||||
periodHolder = periodHolder.getNext();
|
||||
if (periodHolder.info.id.equals(newPeriodId)) {
|
||||
periodHolder.info = queue.getUpdatedMediaPeriodInfo(timeline, periodHolder.info);
|
||||
}
|
||||
if (periodHolder.info.id.equals(newPeriodId)) {
|
||||
periodHolder.info = queue.getUpdatedMediaPeriodInfo(timeline, periodHolder.info);
|
||||
}
|
||||
periodHolder = periodHolder.getNext();
|
||||
}
|
||||
newPositionUs = seekToPeriodPosition(newPeriodId, newPositionUs, forceBufferingState);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user