Move queue reevaluate buffer to only execute when playWhenReady is set to false

This commit is contained in:
Colin Kho 2025-01-21 12:02:28 -08:00 committed by microkatz
parent 15bdbf735d
commit 8b0cfda178

View File

@ -961,6 +961,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
if (!shouldPlayWhenReady()) {
stopRenderers();
updatePlaybackPositions();
queue.reevaluateBuffer(rendererPositionUs);
} else {
if (playbackInfo.playbackState == Player.STATE_READY) {
mediaClock.start();
@ -970,7 +971,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
handler.sendEmptyMessage(MSG_DO_SOME_WORK);
}
}
queue.reevaluateBuffer(rendererPositionUs);
}
private void setPauseAtEndOfWindowInternal(boolean pauseAtEndOfWindow)