mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Don't do work after track selection when in ended state
This causes the player to report that it's started loading when in the ended state. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=176371892
This commit is contained in:
parent
275292cb63
commit
13b595ed39
1 changed files with 6 additions and 4 deletions
|
|
@ -878,7 +878,7 @@ import java.io.IOException;
|
||||||
boolean[] streamResetFlags = new boolean[renderers.length];
|
boolean[] streamResetFlags = new boolean[renderers.length];
|
||||||
long periodPositionUs = playingPeriodHolder.updatePeriodTrackSelection(
|
long periodPositionUs = playingPeriodHolder.updatePeriodTrackSelection(
|
||||||
playbackInfo.positionUs, recreateStreams, streamResetFlags);
|
playbackInfo.positionUs, recreateStreams, streamResetFlags);
|
||||||
if (periodPositionUs != playbackInfo.positionUs) {
|
if (state != Player.STATE_ENDED && periodPositionUs != playbackInfo.positionUs) {
|
||||||
playbackInfo = playbackInfo.fromNewPosition(playbackInfo.periodId, periodPositionUs,
|
playbackInfo = playbackInfo.fromNewPosition(playbackInfo.periodId, periodPositionUs,
|
||||||
playbackInfo.contentPositionUs);
|
playbackInfo.contentPositionUs);
|
||||||
eventHandler.obtainMessage(MSG_POSITION_DISCONTINUITY, Player.DISCONTINUITY_REASON_INTERNAL,
|
eventHandler.obtainMessage(MSG_POSITION_DISCONTINUITY, Player.DISCONTINUITY_REASON_INTERNAL,
|
||||||
|
|
@ -923,9 +923,11 @@ import java.io.IOException;
|
||||||
loadingPeriodHolder.updatePeriodTrackSelection(loadingPeriodPositionUs, false);
|
loadingPeriodHolder.updatePeriodTrackSelection(loadingPeriodPositionUs, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
maybeContinueLoading();
|
if (state != Player.STATE_ENDED) {
|
||||||
updatePlaybackPositions();
|
maybeContinueLoading();
|
||||||
handler.sendEmptyMessage(MSG_DO_SOME_WORK);
|
updatePlaybackPositions();
|
||||||
|
handler.sendEmptyMessage(MSG_DO_SOME_WORK);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isTimelineReady(long playingPeriodDurationUs) {
|
private boolean isTimelineReady(long playingPeriodDurationUs) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue