Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e8117496
authored
Mar 30, 2023
by
Tianyi Feng
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge pull request #11051 from TiVo:p-fix-for-issue-11050
PiperOrigin-RevId: 518953648
parents
1d0230ab
f2cf82cd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java
library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java
View file @
e8117496
...
@@ -1248,7 +1248,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
...
@@ -1248,7 +1248,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
=
...
@@ -1898,7 +1899,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
...
@@ -1898,7 +1899,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
;
...
@@ -1936,7 +1938,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
...
@@ -1936,7 +1938,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
...
@@ -1966,8 +1969,9 @@ import java.util.concurrent.atomic.AtomicBoolean;
...
@@ -1966,8 +1969,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
);
}
}
}
}
...
@@ -2090,7 +2094,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
...
@@ -2090,7 +2094,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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment