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
f52bb274
authored
Nov 16, 2022
by
Googler
Committed by
microkatz
Nov 21, 2022
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Fix NPE when listener is not set
PiperOrigin-RevId: 488970696
parent
ea7e8cff
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
library/core/src/main/java/com/google/android/exoplayer2/audio/DefaultAudioSink.java
library/core/src/main/java/com/google/android/exoplayer2/audio/DefaultAudioSink.java
View file @
f52bb274
...
@@ -890,9 +890,11 @@ public final class DefaultAudioSink implements AudioSink {
...
@@ -890,9 +890,11 @@ public final class DefaultAudioSink implements AudioSink {
getSubmittedFrames
()
-
trimmingAudioProcessor
.
getTrimmedFrameCount
());
getSubmittedFrames
()
-
trimmingAudioProcessor
.
getTrimmedFrameCount
());
if
(!
startMediaTimeUsNeedsSync
if
(!
startMediaTimeUsNeedsSync
&&
Math
.
abs
(
expectedPresentationTimeUs
-
presentationTimeUs
)
>
200000
)
{
&&
Math
.
abs
(
expectedPresentationTimeUs
-
presentationTimeUs
)
>
200000
)
{
if
(
listener
!=
null
)
{
listener
.
onAudioSinkError
(
listener
.
onAudioSinkError
(
new
AudioSink
.
UnexpectedDiscontinuityException
(
new
AudioSink
.
UnexpectedDiscontinuityException
(
presentationTimeUs
,
expectedPresentationTimeUs
));
presentationTimeUs
,
expectedPresentationTimeUs
));
}
startMediaTimeUsNeedsSync
=
true
;
startMediaTimeUsNeedsSync
=
true
;
}
}
if
(
startMediaTimeUsNeedsSync
)
{
if
(
startMediaTimeUsNeedsSync
)
{
...
...
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