Commit 8e7a2ba9 by tonihei Committed by Andrew Lewis

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