Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d4e79f09 authored by Robert Shih's avatar Robert Shih Committed by android-build-merger
Browse files

Merge "AudioCapabilities: handle non-standard codec max input channels" into oc-dev am: ffb563d8

am: 6033c043

Change-Id: I7879b4b76a202dce3cebad1ad37aac3ddb599278
parents 1f3179a7 6033c043
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1067,7 +1067,7 @@ public final class MediaCodecInfo {
        private void applyLevelLimits() {
            int[] sampleRates = null;
            Range<Integer> sampleRateRange = null, bitRates = null;
            int maxChannels = 0;
            int maxChannels = MAX_INPUT_CHANNEL_COUNT;
            String mime = mParent.getMimeType();

            if (mime.equalsIgnoreCase(MediaFormat.MIMETYPE_AUDIO_MPEG)) {
@@ -1160,6 +1160,8 @@ public final class MediaCodecInfo {
            if (info.containsKey("max-channel-count")) {
                maxInputChannels = Utils.parseIntSafely(
                        info.getString("max-channel-count"), maxInputChannels);
            } else if ((mParent.mError & ERROR_UNSUPPORTED) != 0) {
                maxInputChannels = 0;
            }
            if (info.containsKey("bitrate-range")) {
                bitRates = bitRates.intersect(