Ensure to update all existing MediaPeriodInfo to new Timeline

AnalyticsCollector keeps a list of existing MediaPeriodInfo that need
to be updated to new Timelines when they arrive. This already
happens in all cases except that the playingMediaPeriod wasn't updated
when it didn't change during the timeline update.

PiperOrigin-RevId: 297812038
This commit is contained in:
tonihei 2020-02-28 12:01:14 +00:00 committed by Oliver Woodman
parent 3b1b2951e4
commit 3ef0015817

View File

@ -790,6 +790,8 @@ public class AnalyticsCollector
}
if (!mediaPeriodInfoQueue.isEmpty()) {
playingMediaPeriod = mediaPeriodInfoQueue.get(0);
} else if (playingMediaPeriod != null) {
playingMediaPeriod = updateMediaPeriodInfoToNewTimeline(playingMediaPeriod, timeline);
}
this.timeline = timeline;
currentPlayerMediaPeriod = findMatchingMediaPeriodInQueue(player);