mirror of
https://github.com/samsonjs/media.git
synced 2026-04-19 13:35:47 +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];
|
||||
long periodPositionUs = playingPeriodHolder.updatePeriodTrackSelection(
|
||||
playbackInfo.positionUs, recreateStreams, streamResetFlags);
|
||||
if (periodPositionUs != playbackInfo.positionUs) {
|
||||
if (state != Player.STATE_ENDED && periodPositionUs != playbackInfo.positionUs) {
|
||||
playbackInfo = playbackInfo.fromNewPosition(playbackInfo.periodId, periodPositionUs,
|
||||
playbackInfo.contentPositionUs);
|
||||
eventHandler.obtainMessage(MSG_POSITION_DISCONTINUITY, Player.DISCONTINUITY_REASON_INTERNAL,
|
||||
|
|
@ -923,9 +923,11 @@ import java.io.IOException;
|
|||
loadingPeriodHolder.updatePeriodTrackSelection(loadingPeriodPositionUs, false);
|
||||
}
|
||||
}
|
||||
maybeContinueLoading();
|
||||
updatePlaybackPositions();
|
||||
handler.sendEmptyMessage(MSG_DO_SOME_WORK);
|
||||
if (state != Player.STATE_ENDED) {
|
||||
maybeContinueLoading();
|
||||
updatePlaybackPositions();
|
||||
handler.sendEmptyMessage(MSG_DO_SOME_WORK);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isTimelineReady(long playingPeriodDurationUs) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue