Commit 8d2fd383 by tonihei Committed by Oliver Woodman

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
parent 17d13433
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment