Fix setting maskingPeriodIndex in ExoPlayerImpl
Whenever we set the maskingWindowIndex, we also need to set the masking period index and the masking position. Otherwise it may cause exception when the period index is used together with the masking timeline. PiperOrigin-RevId: 290036973
This commit is contained in:
parent
17d1343375
commit
8d2fd383f9
@ -1029,6 +1029,8 @@ import java.util.concurrent.TimeoutException;
|
||||
if (maskingTimeline.getIndexOfPeriod(periodUid) != C.INDEX_UNSET) {
|
||||
// Get the window index of the current period that exists in the new timeline also.
|
||||
maskingWindowIndex = maskingTimeline.getPeriodByUid(periodUid, period).windowIndex;
|
||||
maskingPeriodIndex = maskingTimeline.getIndexOfPeriod(periodUid);
|
||||
maskingWindowPositionMs = currentPositionMs;
|
||||
} else {
|
||||
// Period uid not found in new timeline. Try to get subsequent period.
|
||||
@Nullable
|
||||
|
Loading…
x
Reference in New Issue
Block a user