Commit 6060b811 by Oliver Woodman

Relax audio decoder capability checks

Issue: #5145
parent f6165f75
......@@ -248,9 +248,15 @@ public final class MediaCodecInfo {
// If we don't know any better, we assume that the profile and level are supported.
return true;
}
int profile = codecProfileAndLevel.first;
int level = codecProfileAndLevel.second;
if (!isVideo && profile != CodecProfileLevel.AACObjectXHE) {
// Some devices/builds under-report audio capabilities, so assume support except for xHE-AAC
// which is not widely supported. See https://github.com/google/ExoPlayer/issues/5145.
return true;
}
for (CodecProfileLevel capabilities : getProfileLevels()) {
if (capabilities.profile == codecProfileAndLevel.first
&& capabilities.level >= codecProfileAndLevel.second) {
if (capabilities.profile == profile && capabilities.level >= level) {
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