From 7e9b1fc8ae793e360b094876175a0fcf3f94ccfe Mon Sep 17 00:00:00 2001 From: olly Date: Thu, 17 Aug 2017 07:48:49 -0700 Subject: [PATCH] Work around issue with Xiaomi JB devices Issue: #3171 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=165577562 --- .../android/exoplayer2/mediacodec/MediaCodecUtil.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java b/library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java index d3f3dae344c..1073e8d9c18 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java @@ -288,9 +288,11 @@ private static boolean isCodecUsableDecoder(android.media.MediaCodecInfo info, S return false; } - // Work around https://github.com/google/ExoPlayer/issues/1528 + // Work around https://github.com/google/ExoPlayer/issues/1528 and + // https://github.com/google/ExoPlayer/issues/3171 if (Util.SDK_INT < 18 && "OMX.MTK.AUDIO.DECODER.AAC".equals(name) - && "a70".equals(Util.DEVICE)) { + && ("a70".equals(Util.DEVICE) + || ("Xiaomi".equals(Util.MANUFACTURER) && Util.DEVICE.startsWith("HM")))) { return false; }