From 3538e57797b799411a3e32eb098db49194b75a55 Mon Sep 17 00:00:00 2001 From: Oliver Woodman Date: Fri, 18 Sep 2015 18:20:47 +0100 Subject: [PATCH] Work around incorrect timestamp handling on Sony Xperia E. Also include more Sony Xperia Z devices in the MP3 workaround. --- .../android/exoplayer/MediaCodecUtil.java | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/library/src/main/java/com/google/android/exoplayer/MediaCodecUtil.java b/library/src/main/java/com/google/android/exoplayer/MediaCodecUtil.java index 11a7dc3c82..a2bd8f7466 100644 --- a/library/src/main/java/com/google/android/exoplayer/MediaCodecUtil.java +++ b/library/src/main/java/com/google/android/exoplayer/MediaCodecUtil.java @@ -180,10 +180,25 @@ public final class MediaCodecUtil { // Work around an issue where creating a particular MP3 decoder on some devices on platform API // version 16 crashes mediaserver. if (Util.SDK_INT == 16 + && "OMX.qcom.audio.decoder.mp3".equals(name) && ("dlxu".equals(Util.DEVICE) // HTC Butterfly || "protou".equals(Util.DEVICE) // HTC Desire X - || "C6602".equals(Util.DEVICE) || "C6603".equals(Util.DEVICE)) // Sony Xperia Z - && name.equals("OMX.qcom.audio.decoder.mp3")) { + || "C6602".equals(Util.DEVICE) // Sony Xperia Z + || "C6603".equals(Util.DEVICE) + || "C6606".equals(Util.DEVICE) + || "C6616".equals(Util.DEVICE) + || "L36h".equals(Util.DEVICE) + || "SO-02E".equals(Util.DEVICE))) { + return false; + } + + // Work around an issue where large timestamps are not propagated correctly. + if (Util.SDK_INT == 16 + && "OMX.qcom.audio.decoder.aac".equals(name) + && ("C1504".equals(Util.DEVICE) // Sony Xperia E + || "C1505".equals(Util.DEVICE) + || "C1604".equals(Util.DEVICE) // Sony Xperia E dual + || "C1605".equals(Util.DEVICE))) { return false; }