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
This commit is contained in:
commit
dc3481fca7
2 changed files with 13 additions and 6 deletions
|
|
@ -11,6 +11,8 @@
|
||||||
* Update `SampleQueue` to store `sourceId` as a `long` rather than an
|
* Update `SampleQueue` to store `sourceId` as a `long` rather than an
|
||||||
`int`. This changes the signatures of public methods
|
`int`. This changes the signatures of public methods
|
||||||
`SampleQueue.sourceId` and `SampleQueue.peekSourceId`.
|
`SampleQueue.sourceId` and `SampleQueue.peekSourceId`.
|
||||||
|
* Reset target live stream override when seeking to default position
|
||||||
|
([#11051](https://github.com/google/ExoPlayer/pull/11051)).
|
||||||
* Audio:
|
* Audio:
|
||||||
* Fix bug where some playbacks fail when tunneling is enabled and
|
* Fix bug where some playbacks fail when tunneling is enabled and
|
||||||
`AudioProcessors` are active, e.g. for gapless trimming
|
`AudioProcessors` are active, e.g. for gapless trimming
|
||||||
|
|
|
||||||
|
|
@ -1256,7 +1256,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 =
|
||||||
|
|
@ -1906,7 +1907,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;
|
||||||
|
|
@ -1944,7 +1946,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
|
||||||
|
|
@ -1974,8 +1977,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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2098,7 +2102,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