mirror of
https://github.com/samsonjs/media.git
synced 2026-04-09 11:55:46 +00:00
Fix resolveSubsequentPeriod in EPII.
getNextPeriod might return C.INDEX_UNSET. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=159676949
This commit is contained in:
parent
ed060a8f33
commit
9154d54df9
1 changed files with 4 additions and 0 deletions
|
|
@ -1083,6 +1083,10 @@ import java.io.IOException;
|
|||
int maxIterations = oldTimeline.getPeriodCount();
|
||||
for (int i = 0; i < maxIterations && newPeriodIndex == C.INDEX_UNSET; i++) {
|
||||
oldPeriodIndex = oldTimeline.getNextPeriodIndex(oldPeriodIndex, period, window, repeatMode);
|
||||
if (oldPeriodIndex == C.INDEX_UNSET) {
|
||||
// We've reached the end of the old timeline.
|
||||
break;
|
||||
}
|
||||
newPeriodIndex = newTimeline.getIndexOfPeriod(
|
||||
oldTimeline.getPeriod(oldPeriodIndex, period, true).uid);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue