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
6e751c35
authored
Jul 22, 2020
by
ibaker
Committed by
Oliver Woodman
Jul 24, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Enable nullness checking for DefaultMediaClock
PiperOrigin-RevId: 322542289
parent
0efec5f6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
library/core/src/main/java/com/google/android/exoplayer2/DefaultMediaClock.java
library/core/src/main/java/com/google/android/exoplayer2/DefaultMediaClock.java
View file @
6e751c35
...
...
@@ -16,6 +16,7 @@
package
com
.
google
.
android
.
exoplayer2
;
import
androidx.annotation.Nullable
;
import
com.google.android.exoplayer2.util.Assertions
;
import
com.google.android.exoplayer2.util.Clock
;
import
com.google.android.exoplayer2.util.MediaClock
;
import
com.google.android.exoplayer2.util.StandaloneMediaClock
;
...
...
@@ -133,7 +134,9 @@ import com.google.android.exoplayer2.util.StandaloneMediaClock;
@Override
public
long
getPositionUs
()
{
return
isUsingStandaloneClock
?
standaloneClock
.
getPositionUs
()
:
rendererClock
.
getPositionUs
();
return
isUsingStandaloneClock
?
standaloneClock
.
getPositionUs
()
:
Assertions
.
checkNotNull
(
rendererClock
).
getPositionUs
();
}
@Override
...
...
@@ -160,6 +163,9 @@ import com.google.android.exoplayer2.util.StandaloneMediaClock;
}
return
;
}
// We are either already using the renderer clock or switching from the standalone to the
// renderer clock, so it must be non-null.
MediaClock
rendererClock
=
Assertions
.
checkNotNull
(
this
.
rendererClock
);
long
rendererClockPositionUs
=
rendererClock
.
getPositionUs
();
if
(
isUsingStandaloneClock
)
{
// Ensure enabling the renderer clock doesn't jump backwards in time.
...
...
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