Commit bad8ec59 by andrewlewis Committed by Oliver Woodman

Relax audio decoder capability checks

Issue: #5145
PiperOrigin-RevId: 226297129
parent 4f8b0983
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
### dev-v2 (not yet released) ### ### dev-v2 (not yet released) ###
* Use Transport Stream's random access indicator to minimize the need for * Use Transport Stream's random access indicator to minimize the need for
FLAG_ALLOW_NON_IDR_KEYFRAMES. `FLAG_ALLOW_NON_IDR_KEYFRAMES`.
* Support for playing spherical videos on Daydream. * Support for playing spherical videos on Daydream.
* Improve decoder re-use between playbacks. TODO: Write and link a blog post * Improve decoder re-use between playbacks. TODO: Write and link a blog post
here ([#2826](https://github.com/google/ExoPlayer/issues/2826)). here ([#2826](https://github.com/google/ExoPlayer/issues/2826)).
...@@ -35,7 +35,11 @@ ...@@ -35,7 +35,11 @@
* DownloadManager: * DownloadManager:
* Create only one task for all DownloadActions for the same content. * Create only one task for all DownloadActions for the same content.
* Rename TaskState to DownloadState. * Rename TaskState to DownloadState.
* MP3: * Audio:
* Fix issue where some audio formats were incorrectly marked as being
unplayable due to underreported audio decoder capabilities
([#5145](https://github.com/google/ExoPlayer/issues/5145)).
* MP3:
* Use the true bitrate for constant-bitrate MP3 seeking. * Use the true bitrate for constant-bitrate MP3 seeking.
* Fix issue where streams would play twice on some Samsung devices * Fix issue where streams would play twice on some Samsung devices
([#4519](https://github.com/google/ExoPlayer/issues/4519)). ([#4519](https://github.com/google/ExoPlayer/issues/4519)).
......
...@@ -248,9 +248,15 @@ public final class MediaCodecInfo { ...@@ -248,9 +248,15 @@ public final class MediaCodecInfo {
// If we don't know any better, we assume that the profile and level are supported. // If we don't know any better, we assume that the profile and level are supported.
return true; return true;
} }
int profile = codecProfileAndLevel.first;
int level = codecProfileAndLevel.second;
if (!isVideo && profile != CodecProfileLevel.AACObjectXHE) {
// Some devices/builds underreport audio capabilities, so assume support except for xHE-AAC
// which may not be widely supported. See https://github.com/google/ExoPlayer/issues/5145.
return true;
}
for (CodecProfileLevel capabilities : getProfileLevels()) { for (CodecProfileLevel capabilities : getProfileLevels()) {
if (capabilities.profile == codecProfileAndLevel.first if (capabilities.profile == profile && capabilities.level >= level) {
&& capabilities.level >= codecProfileAndLevel.second) {
return true; return true;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment