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) {
|
if (supportedEncodings.length == 0) {
|
||||||
return DEFAULT_AUDIO_CAPABILITIES;
|
return DEFAULT_AUDIO_CAPABILITIES;
|
||||||
} else {
|
} else {
|
||||||
|
supportedEncodings = Util.nullSafeIntegerArrayDistinct(supportedEncodings);
|
||||||
return new AudioCapabilities(supportedEncodings, /* defaultValue= */
|
return new AudioCapabilities(supportedEncodings, /* defaultValue= */
|
||||||
DEFAULT_MAX_CHANNEL_COUNT);
|
DEFAULT_MAX_CHANNEL_COUNT);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user