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
c0e633fb
authored
Nov 12, 2019
by
bachinger
Committed by
Oliver Woodman
Nov 17, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
use getPeriodByUid when searching for subsequent period of seek timeline
Issue: #6641 PiperOrigin-RevId: 279963739
parent
4b012a9b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 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 @
c0e633fb
...
@@ -1433,6 +1433,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
...
@@ -1433,6 +1433,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
* @throws IllegalSeekPositionException If the window index of the seek position is outside the
* @throws IllegalSeekPositionException If the window index of the seek position is outside the
* bounds of the timeline.
* bounds of the timeline.
*/
*/
@Nullable
private
Pair
<
Object
,
Long
>
resolveSeekPosition
(
private
Pair
<
Object
,
Long
>
resolveSeekPosition
(
SeekPosition
seekPosition
,
boolean
trySubsequentPeriods
)
{
SeekPosition
seekPosition
,
boolean
trySubsequentPeriods
)
{
Timeline
timeline
=
playbackInfo
.
timeline
;
Timeline
timeline
=
playbackInfo
.
timeline
;
...
@@ -1467,11 +1468,12 @@ import java.util.concurrent.atomic.AtomicBoolean;
...
@@ -1467,11 +1468,12 @@ import java.util.concurrent.atomic.AtomicBoolean;
}
}
if
(
trySubsequentPeriods
)
{
if
(
trySubsequentPeriods
)
{
// Try and find a subsequent period from the seek timeline in the internal timeline.
// Try and find a subsequent period from the seek timeline in the internal timeline.
@Nullable
Object
periodUid
=
resolveSubsequentPeriod
(
periodPosition
.
first
,
seekTimeline
,
timeline
);
Object
periodUid
=
resolveSubsequentPeriod
(
periodPosition
.
first
,
seekTimeline
,
timeline
);
if
(
periodUid
!=
null
)
{
if
(
periodUid
!=
null
)
{
// We found one.
Map the SeekPosition onto the corresponding default position
.
// We found one.
Use the default position of the corresponding window
.
return
getPeriodPosition
(
return
getPeriodPosition
(
timeline
,
timeline
.
getPeriod
(
periodIndex
,
period
).
windowIndex
,
C
.
TIME_UNSET
);
timeline
,
timeline
.
getPeriod
ByUid
(
periodUid
,
period
).
windowIndex
,
C
.
TIME_UNSET
);
}
}
}
}
// We didn't find one. Give up.
// We didn't find one. Give up.
...
...
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