Commit c72278d2 by andrewlewis Committed by Oliver Woodman

Separate handling of oldTimeline == null case

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164254522
parent 1203b534
......@@ -986,26 +986,29 @@ import java.io.IOException;
// The seek position was valid for the timeline that it was performed into, but the
// timeline has changed and a suitable seek position could not be resolved in the new one.
handleSourceInfoRefreshEndedPlayback(manifest, processedInitialSeekCount);
return;
} else {
int periodIndex = periodPosition.first;
long positionUs = periodPosition.second;
MediaPeriodId periodId =
mediaPeriodInfoSequence.resolvePeriodPositionForAds(periodIndex, positionUs);
playbackInfo = new PlaybackInfo(periodId, periodId.isAd() ? 0 : positionUs, positionUs);
notifySourceInfoRefresh(manifest, processedInitialSeekCount);
}
int periodIndex = periodPosition.first;
long positionUs = periodPosition.second;
MediaPeriodId periodId =
mediaPeriodInfoSequence.resolvePeriodPositionForAds(periodIndex, positionUs);
playbackInfo = new PlaybackInfo(periodId, periodId.isAd() ? 0 : positionUs, positionUs);
} else if (playbackInfo.startPositionUs == C.TIME_UNSET) {
if (timeline.isEmpty()) {
handleSourceInfoRefreshEndedPlayback(manifest, processedInitialSeekCount);
return;
} else {
Pair<Integer, Long> defaultPosition = getPeriodPosition(0, C.TIME_UNSET);
int periodIndex = defaultPosition.first;
long startPositionUs = defaultPosition.second;
MediaPeriodId periodId = mediaPeriodInfoSequence.resolvePeriodPositionForAds(periodIndex,
startPositionUs);
playbackInfo = new PlaybackInfo(periodId, periodId.isAd() ? 0 : startPositionUs,
startPositionUs);
notifySourceInfoRefresh(manifest, processedInitialSeekCount);
}
Pair<Integer, Long> defaultPosition = getPeriodPosition(0, C.TIME_UNSET);
int periodIndex = defaultPosition.first;
long startPositionUs = defaultPosition.second;
MediaPeriodId periodId = mediaPeriodInfoSequence.resolvePeriodPositionForAds(periodIndex,
startPositionUs);
playbackInfo = new PlaybackInfo(periodId, periodId.isAd() ? 0 : startPositionUs,
startPositionUs);
}
return;
}
MediaPeriodHolder periodHolder = playingPeriodHolder != null ? playingPeriodHolder
......
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