mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Add distinct encodings check before returning AudioCapabilities.
This commit is contained in:
parent
753257e454
commit
b1ac7685bd
@ -121,6 +121,7 @@ public final class AudioCapabilities {
|
||||
if (supportedEncodings.length == 0) {
|
||||
return DEFAULT_AUDIO_CAPABILITIES;
|
||||
} else {
|
||||
supportedEncodings = Util.nullSafeIntegerArrayDistinct(supportedEncodings);
|
||||
return new AudioCapabilities(supportedEncodings, /* defaultValue= */
|
||||
DEFAULT_MAX_CHANNEL_COUNT);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user