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
26d75baa
authored
Dec 09, 2022
by
samrobinson
Committed by
Ian Baker
Dec 12, 2022
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Add handling for null input buffer in DefaultAudioSink processBuffers.
#minor-release PiperOrigin-RevId: 494166943
parent
92bd4c61
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 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 @
26d75baa
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
package
com
.
google
.
android
.
exoplayer2
.
audio
;
package
com
.
google
.
android
.
exoplayer2
.
audio
;
import
static
com
.
google
.
android
.
exoplayer2
.
audio
.
AudioCapabilities
.
DEFAULT_AUDIO_CAPABILITIES
;
import
static
com
.
google
.
android
.
exoplayer2
.
audio
.
AudioCapabilities
.
DEFAULT_AUDIO_CAPABILITIES
;
import
static
com
.
google
.
android
.
exoplayer2
.
audio
.
AudioProcessor
.
EMPTY_BUFFER
;
import
static
com
.
google
.
android
.
exoplayer2
.
util
.
Assertions
.
checkNotNull
;
import
static
com
.
google
.
android
.
exoplayer2
.
util
.
Assertions
.
checkNotNull
;
import
static
com
.
google
.
android
.
exoplayer2
.
util
.
Util
.
constrainValue
;
import
static
com
.
google
.
android
.
exoplayer2
.
util
.
Util
.
constrainValue
;
import
static
java
.
lang
.
Math
.
max
;
import
static
java
.
lang
.
Math
.
max
;
...
@@ -1002,8 +1003,8 @@ public final class DefaultAudioSink implements AudioSink {
...
@@ -1002,8 +1003,8 @@ public final class DefaultAudioSink implements AudioSink {
* {@link #writeBuffer(ByteBuffer, long)}.
* {@link #writeBuffer(ByteBuffer, long)}.
*/
*/
private
void
processBuffers
(
long
avSyncPresentationTimeUs
)
throws
WriteException
{
private
void
processBuffers
(
long
avSyncPresentationTimeUs
)
throws
WriteException
{
if
(!
audioProcessingPipeline
.
isOperational
()
&&
inputBuffer
!=
null
)
{
if
(!
audioProcessingPipeline
.
isOperational
())
{
writeBuffer
(
inputBuffer
,
avSyncPresentationTimeUs
);
writeBuffer
(
inputBuffer
!=
null
?
inputBuffer
:
EMPTY_BUFFER
,
avSyncPresentationTimeUs
);
return
;
return
;
}
}
...
...
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