From 1845a4ae6908f682cc20df715df4af74d7f79ba6 Mon Sep 17 00:00:00 2001 From: andrewlewis Date: Thu, 21 Dec 2023 11:49:31 -0800 Subject: [PATCH] Expand operating rate workaround to T612 chipset PiperOrigin-RevId: 592916187 --- .../media3/transformer/DefaultEncoderFactory.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/libraries/transformer/src/main/java/androidx/media3/transformer/DefaultEncoderFactory.java b/libraries/transformer/src/main/java/androidx/media3/transformer/DefaultEncoderFactory.java index adbc738120..c361276a75 100644 --- a/libraries/transformer/src/main/java/androidx/media3/transformer/DefaultEncoderFactory.java +++ b/libraries/transformer/src/main/java/androidx/media3/transformer/DefaultEncoderFactory.java @@ -527,11 +527,13 @@ public final class DefaultEncoderFactory implements Codec.EncoderFactory { } private static boolean deviceNeedsLowerOperatingRateAvoidingOverflowWorkaround() { - // On this chipset, setting an operating rate close to Integer.MAX_VALUE will cause the encoder - // to throw at configuration time. Setting the operating rate to 1000 avoids being close to an - // integer overflow limit while being higher than a maximum feasible operating rate. See - // [internal b/311206113]. - return Util.SDK_INT >= 31 && Util.SDK_INT <= 34 && Build.SOC_MODEL.equals("SM8550"); + // On these chipsets, setting an operating rate close to Integer.MAX_VALUE will cause the + // encoder to throw at configuration time. Setting the operating rate to 1000 avoids being close + // to an integer overflow limit while being higher than a maximum feasible operating rate. See + // [internal b/311206113, b/317297946]. + return Util.SDK_INT >= 31 + && Util.SDK_INT <= 34 + && (Build.SOC_MODEL.equals("SM8550") || Build.SOC_MODEL.equals("T612")); } /**