mirror of
https://github.com/samsonjs/media.git
synced 2026-04-08 11:45:51 +00: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
1 changed files with 4 additions and 6 deletions
|
|
@ -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…
Reference in a new issue