Loading media/java/android/media/MediaCodecInfo.java +2 −5 Original line number Original line Diff line number Diff line Loading @@ -701,13 +701,10 @@ public final class MediaCodecInfo { final Map<String, Object> global = MediaCodecList.getGlobalSettings(); final Map<String, Object> global = MediaCodecList.getGlobalSettings(); mMaxSupportedInstances = Utils.parseIntSafely( mMaxSupportedInstances = Utils.parseIntSafely( global.get("max-supported-instances"), DEFAULT_MAX_SUPPORTED_INSTANCES); global.get("max-concurrent-instances"), DEFAULT_MAX_SUPPORTED_INSTANCES); int maxInstances = Utils.parseIntSafely( int maxInstances = Utils.parseIntSafely( map.get("max-supported-instances"), mMaxSupportedInstances); map.get("max-concurrent-instances"), mMaxSupportedInstances); // TODO: replace all max-supported-instances with max-concurrent-instances. maxInstances = Utils.parseIntSafely( map.get("max-concurrent-instances"), maxInstances); mMaxSupportedInstances = mMaxSupportedInstances = Range.create(1, MAX_SUPPORTED_INSTANCES_LIMIT).clamp(maxInstances); Range.create(1, MAX_SUPPORTED_INSTANCES_LIMIT).clamp(maxInstances); Loading Loading
media/java/android/media/MediaCodecInfo.java +2 −5 Original line number Original line Diff line number Diff line Loading @@ -701,13 +701,10 @@ public final class MediaCodecInfo { final Map<String, Object> global = MediaCodecList.getGlobalSettings(); final Map<String, Object> global = MediaCodecList.getGlobalSettings(); mMaxSupportedInstances = Utils.parseIntSafely( mMaxSupportedInstances = Utils.parseIntSafely( global.get("max-supported-instances"), DEFAULT_MAX_SUPPORTED_INSTANCES); global.get("max-concurrent-instances"), DEFAULT_MAX_SUPPORTED_INSTANCES); int maxInstances = Utils.parseIntSafely( int maxInstances = Utils.parseIntSafely( map.get("max-supported-instances"), mMaxSupportedInstances); map.get("max-concurrent-instances"), mMaxSupportedInstances); // TODO: replace all max-supported-instances with max-concurrent-instances. maxInstances = Utils.parseIntSafely( map.get("max-concurrent-instances"), maxInstances); mMaxSupportedInstances = mMaxSupportedInstances = Range.create(1, MAX_SUPPORTED_INSTANCES_LIMIT).clamp(maxInstances); Range.create(1, MAX_SUPPORTED_INSTANCES_LIMIT).clamp(maxInstances); Loading