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
a73a9e9c
authored
Mar 03, 2022
by
andrewlewis
Committed by
Ian Baker
Mar 07, 2022
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Fix E-AC3 output capability check without sample rate
#minor-release PiperOrigin-RevId: 432189509
parent
232f2d81
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
libraries/exoplayer/src/main/java/androidx/media3/exoplayer/audio/DefaultAudioSink.java
libraries/exoplayer/src/main/java/androidx/media3/exoplayer/audio/DefaultAudioSink.java
View file @
a73a9e9c
...
@@ -1745,8 +1745,11 @@ public final class DefaultAudioSink implements AudioSink {
...
@@ -1745,8 +1745,11 @@ public final class DefaultAudioSink implements AudioSink {
// the channel count for this encoding, but before then there is no way to query it so we
// the channel count for this encoding, but before then there is no way to query it so we
// assume 6 channel audio is supported.
// assume 6 channel audio is supported.
if
(
Util
.
SDK_INT
>=
29
)
{
if
(
Util
.
SDK_INT
>=
29
)
{
// Default to 48 kHz if the format doesn't have a sample rate (for example, for chunkless
// HLS preparation). See [Internal: b/222127949].
int
sampleRate
=
format
.
sampleRate
!=
Format
.
NO_VALUE
?
format
.
sampleRate
:
48000
;
channelCount
=
channelCount
=
getMaxSupportedChannelCountForPassthroughV29
(
C
.
ENCODING_E_AC3_JOC
,
format
.
sampleRate
);
getMaxSupportedChannelCountForPassthroughV29
(
C
.
ENCODING_E_AC3_JOC
,
sampleRate
);
if
(
channelCount
==
0
)
{
if
(
channelCount
==
0
)
{
Log
.
w
(
TAG
,
"E-AC3 JOC encoding supported but no channel count supported"
);
Log
.
w
(
TAG
,
"E-AC3 JOC encoding supported but no channel count supported"
);
return
null
;
return
null
;
...
...
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