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
23fa53bf
authored
May 10, 2019
by
tonihei
Committed by
Oliver Woodman
May 15, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Add setCodecOperatingRate workaround for 48KHz audio on ZTE Axon7 mini.
Issue:#5821 PiperOrigin-RevId: 247621164
parent
34dd4b14
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
RELEASENOTES.md
library/core/src/main/java/com/google/android/exoplayer2/audio/MediaCodecAudioRenderer.java
RELEASENOTES.md
View file @
23fa53bf
...
...
@@ -13,7 +13,9 @@
*
Audio: fix an issue where not all audio was played out when the configuration
for the underlying track was changing (e.g., at some period transitions).
*
UI: Change playback controls toggle from touch down to touch up events
(
[
#5784
](
https://github.com/google/ExoPlayer/issues/5784
)
).
(
[
#5784
](
https://github.com/google/ExoPlayer/issues/5784
)
).
*
Add a workaround for a decoder failure on ZTE Axon7 mini devices when playing
48kHz audio (
[
#5821
](
https://github.com/google/ExoPlayer/issues/5821
)
).
### 2.10.0 ###
...
...
library/core/src/main/java/com/google/android/exoplayer2/audio/MediaCodecAudioRenderer.java
View file @
23fa53bf
...
...
@@ -798,7 +798,7 @@ public class MediaCodecAudioRenderer extends MediaCodecRenderer implements Media
// Set codec configuration values.
if
(
Util
.
SDK_INT
>=
23
)
{
mediaFormat
.
setInteger
(
MediaFormat
.
KEY_PRIORITY
,
0
/* realtime priority */
);
if
(
codecOperatingRate
!=
CODEC_OPERATING_RATE_UNSET
)
{
if
(
codecOperatingRate
!=
CODEC_OPERATING_RATE_UNSET
&&
!
deviceDoesntSupportOperatingRate
()
)
{
mediaFormat
.
setFloat
(
MediaFormat
.
KEY_OPERATING_RATE
,
codecOperatingRate
);
}
}
...
...
@@ -822,6 +822,17 @@ public class MediaCodecAudioRenderer extends MediaCodecRenderer implements Media
}
/**
* Returns whether the device's decoders are known to not support setting the codec operating
* rate.
*
* <p>See <a href="https://github.com/google/ExoPlayer/issues/5821">GitHub issue #5821</a>.
*/
private
static
boolean
deviceDoesntSupportOperatingRate
()
{
return
Util
.
SDK_INT
==
23
&&
(
"ZTE B2017G"
.
equals
(
Util
.
MODEL
)
||
"AXON 7 mini"
.
equals
(
Util
.
MODEL
));
}
/**
* Returns whether the decoder is known to output six audio channels when provided with input with
* fewer than six channels.
* <p>
...
...
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