mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Merge pull request #11051 from TiVo:p-fix-for-issue-11050
PiperOrigin-RevId: 518953648
(cherry picked from commit dc3481fca7)
This commit is contained in:
parent
eea37031d1
commit
690ac23a20
1 changed files with 11 additions and 6 deletions
|
|
@ -1239,7 +1239,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
/* newPeriodId= */ periodId,
|
/* newPeriodId= */ periodId,
|
||||||
/* oldTimeline= */ playbackInfo.timeline,
|
/* oldTimeline= */ playbackInfo.timeline,
|
||||||
/* oldPeriodId= */ playbackInfo.periodId,
|
/* oldPeriodId= */ playbackInfo.periodId,
|
||||||
/* positionForTargetOffsetOverrideUs= */ requestedContentPositionUs);
|
/* positionForTargetOffsetOverrideUs= */ requestedContentPositionUs,
|
||||||
|
/* forceSetTargetOffsetOverride= */ true);
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
playbackInfo =
|
playbackInfo =
|
||||||
|
|
@ -1882,7 +1883,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
/* oldPeriodId= */ playbackInfo.periodId,
|
/* oldPeriodId= */ playbackInfo.periodId,
|
||||||
/* positionForTargetOffsetOverrideUs */ positionUpdate.setTargetLiveOffset
|
/* positionForTargetOffsetOverrideUs */ positionUpdate.setTargetLiveOffset
|
||||||
? newPositionUs
|
? newPositionUs
|
||||||
: C.TIME_UNSET);
|
: C.TIME_UNSET,
|
||||||
|
/* forceSetTargetOffsetOverride= */ false);
|
||||||
if (periodPositionChanged
|
if (periodPositionChanged
|
||||||
|| newRequestedContentPositionUs != playbackInfo.requestedContentPositionUs) {
|
|| newRequestedContentPositionUs != playbackInfo.requestedContentPositionUs) {
|
||||||
Object oldPeriodUid = playbackInfo.periodId.periodUid;
|
Object oldPeriodUid = playbackInfo.periodId.periodUid;
|
||||||
|
|
@ -1920,7 +1922,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
MediaPeriodId newPeriodId,
|
MediaPeriodId newPeriodId,
|
||||||
Timeline oldTimeline,
|
Timeline oldTimeline,
|
||||||
MediaPeriodId oldPeriodId,
|
MediaPeriodId oldPeriodId,
|
||||||
long positionForTargetOffsetOverrideUs)
|
long positionForTargetOffsetOverrideUs,
|
||||||
|
boolean forceSetTargetOffsetOverride)
|
||||||
throws ExoPlaybackException {
|
throws ExoPlaybackException {
|
||||||
if (!shouldUseLivePlaybackSpeedControl(newTimeline, newPeriodId)) {
|
if (!shouldUseLivePlaybackSpeedControl(newTimeline, newPeriodId)) {
|
||||||
// Live playback speed control is unused for the current period, reset speed to user-defined
|
// Live playback speed control is unused for the current period, reset speed to user-defined
|
||||||
|
|
@ -1950,8 +1953,9 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
int oldWindowIndex = oldTimeline.getPeriodByUid(oldPeriodId.periodUid, period).windowIndex;
|
int oldWindowIndex = oldTimeline.getPeriodByUid(oldPeriodId.periodUid, period).windowIndex;
|
||||||
oldWindowUid = oldTimeline.getWindow(oldWindowIndex, window).uid;
|
oldWindowUid = oldTimeline.getWindow(oldWindowIndex, window).uid;
|
||||||
}
|
}
|
||||||
if (!Util.areEqual(oldWindowUid, windowUid)) {
|
if (!Util.areEqual(oldWindowUid, windowUid) || forceSetTargetOffsetOverride) {
|
||||||
// Reset overridden target live offset to media values if window changes.
|
// Reset overridden target live offset to media values if window changes or if seekTo
|
||||||
|
// default live position.
|
||||||
livePlaybackSpeedControl.setTargetLiveOffsetOverrideUs(C.TIME_UNSET);
|
livePlaybackSpeedControl.setTargetLiveOffsetOverrideUs(C.TIME_UNSET);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2074,7 +2078,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
/* newPeriodId= */ readingPeriodHolder.info.id,
|
/* newPeriodId= */ readingPeriodHolder.info.id,
|
||||||
/* oldTimeline= */ playbackInfo.timeline,
|
/* oldTimeline= */ playbackInfo.timeline,
|
||||||
/* oldPeriodId= */ oldReadingPeriodHolder.info.id,
|
/* oldPeriodId= */ oldReadingPeriodHolder.info.id,
|
||||||
/* positionForTargetOffsetOverrideUs= */ C.TIME_UNSET);
|
/* positionForTargetOffsetOverrideUs= */ C.TIME_UNSET,
|
||||||
|
/* forceSetTargetOffsetOverride= */ false);
|
||||||
|
|
||||||
if (readingPeriodHolder.prepared
|
if (readingPeriodHolder.prepared
|
||||||
&& readingPeriodHolder.mediaPeriod.readDiscontinuity() != C.TIME_UNSET) {
|
&& readingPeriodHolder.mediaPeriod.readDiscontinuity() != C.TIME_UNSET) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue