Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When switch() is called, it checks for what segment/period the media state will need to fetch next. As text is much smaller than audio/ video, it might be the case that text has all the segments in period i while audio and video are still in the process of fetching them. Thus, the next period needed for text will be i+1, while for other media states it will be i. Switch() assumes that if the period needed is not the same as current period, a perios transition is about to happen and there's no point in switching streams now since they're about to change on the next update anyway. However, the period transition only happenes if all the media states require it. In our edge case, only text is ready for the next period, so transition will not happen. This change corrects the assumption "if a media state is ready for the new period, don't switch" to assumption "if ALL media states are ready for the new period, don't switch." Issue #1774 Change-Id: I35f1b7ae10704922fb5692e02fc5f2edc6982575
- Loading branch information