Don't reset masking position when prepare fails.

The removed condition only applies when prepare fails and no timeline was or
is known. We should keep a pending seek position in such a case. The internal
player does the same thing already.

PiperOrigin-RevId: 243819466
This commit is contained in:
tonihei 2019-04-16 17:15:08 +01:00 committed by Andrew Lewis
parent ee08e7dcac
commit 8e7a2ba958

View File

@ -631,8 +631,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
playbackInfo.resetToNewPosition(
playbackInfo.periodId, /* startPositionUs= */ 0, playbackInfo.contentPositionUs);
}
if ((!this.playbackInfo.timeline.isEmpty() || hasPendingPrepare)
&& playbackInfo.timeline.isEmpty()) {
if (!this.playbackInfo.timeline.isEmpty() && playbackInfo.timeline.isEmpty()) {
// Update the masking variables, which are used when the timeline becomes empty.
maskingPeriodIndex = 0;
maskingWindowIndex = 0;