Separate handling of oldTimeline == null case
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=164254522
This commit is contained in:
parent
40f3f1cb78
commit
08e58af6e7
@ -986,26 +986,29 @@ import java.io.IOException;
|
|||||||
// The seek position was valid for the timeline that it was performed into, but the
|
// 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.
|
// timeline has changed and a suitable seek position could not be resolved in the new one.
|
||||||
handleSourceInfoRefreshEndedPlayback(manifest, processedInitialSeekCount);
|
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) {
|
} else if (playbackInfo.startPositionUs == C.TIME_UNSET) {
|
||||||
if (timeline.isEmpty()) {
|
if (timeline.isEmpty()) {
|
||||||
handleSourceInfoRefreshEndedPlayback(manifest, processedInitialSeekCount);
|
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
|
MediaPeriodHolder periodHolder = playingPeriodHolder != null ? playingPeriodHolder
|
||||||
|
Loading…
x
Reference in New Issue
Block a user