mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Fix incorrect renderer reset enable position
handlePeriodPrepared ->setPlayingPeriodHolder ->enableRenderers passes rendererPositionUs to renderer.enable(), but this value is not set correctly. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=138176114
This commit is contained in:
parent
e2081f40fb
commit
3e2cb9f89a
1 changed files with 2 additions and 3 deletions
|
|
@ -1069,12 +1069,12 @@ import java.io.IOException;
|
||||||
if (playingPeriodHolder == null) {
|
if (playingPeriodHolder == null) {
|
||||||
// This is the first prepared period, so start playing it.
|
// This is the first prepared period, so start playing it.
|
||||||
readingPeriodHolder = loadingPeriodHolder;
|
readingPeriodHolder = loadingPeriodHolder;
|
||||||
|
resetRendererPosition(readingPeriodHolder.startPositionUs);
|
||||||
setPlayingPeriodHolder(readingPeriodHolder);
|
setPlayingPeriodHolder(readingPeriodHolder);
|
||||||
if (playbackInfo.startPositionUs == C.TIME_UNSET) {
|
if (playbackInfo.startPositionUs == C.TIME_UNSET) {
|
||||||
// Update the playback info when seeking to a default position.
|
// Update the playback info when seeking to a default position.
|
||||||
playbackInfo = new PlaybackInfo(playingPeriodHolder.index,
|
playbackInfo = new PlaybackInfo(playingPeriodHolder.index,
|
||||||
playingPeriodHolder.startPositionUs);
|
playingPeriodHolder.startPositionUs);
|
||||||
resetRendererPosition(playbackInfo.startPositionUs);
|
|
||||||
updatePlaybackPositions();
|
updatePlaybackPositions();
|
||||||
eventHandler.obtainMessage(MSG_POSITION_DISCONTINUITY, playbackInfo).sendToTarget();
|
eventHandler.obtainMessage(MSG_POSITION_DISCONTINUITY, playbackInfo).sendToTarget();
|
||||||
}
|
}
|
||||||
|
|
@ -1116,8 +1116,7 @@ import java.io.IOException;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setPlayingPeriodHolder(MediaPeriodHolder periodHolder)
|
private void setPlayingPeriodHolder(MediaPeriodHolder periodHolder) throws ExoPlaybackException {
|
||||||
throws ExoPlaybackException {
|
|
||||||
int enabledRendererCount = 0;
|
int enabledRendererCount = 0;
|
||||||
boolean[] rendererWasEnabledFlags = new boolean[renderers.length];
|
boolean[] rendererWasEnabledFlags = new boolean[renderers.length];
|
||||||
for (int i = 0; i < renderers.length; i++) {
|
for (int i = 0; i < renderers.length; i++) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue