From cef0f7a0b184293e92dba6d1dacbb04917d1970f Mon Sep 17 00:00:00 2001 From: olly Date: Mon, 18 Jan 2016 03:13:12 -0800 Subject: [PATCH] Apply flush workaround on S5 Mini devices with Exynos chipset. Also apply the workaround for the secure variant of OMX.SEC.avc.dec. Note that it's not necessary to do the same for the RK decoder in the method below, since that workaround is targeted at SDK_INT<=17 and secure decoders only came along in 18. Issue: #603 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=112395376 --- .../google/android/exoplayer/MediaCodecTrackRenderer.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/library/src/main/java/com/google/android/exoplayer/MediaCodecTrackRenderer.java b/library/src/main/java/com/google/android/exoplayer/MediaCodecTrackRenderer.java index 26d4cc11e0..df75064113 100644 --- a/library/src/main/java/com/google/android/exoplayer/MediaCodecTrackRenderer.java +++ b/library/src/main/java/com/google/android/exoplayer/MediaCodecTrackRenderer.java @@ -958,7 +958,10 @@ public abstract class MediaCodecTrackRenderer extends SampleSourceTrackRenderer */ private static boolean codecNeedsFlushWorkaround(String name) { return Util.SDK_INT < 18 - || (Util.SDK_INT == 18 && "OMX.SEC.avc.dec".equals(name)); + || (Util.SDK_INT == 18 + && ("OMX.SEC.avc.dec".equals(name) || "OMX.SEC.avc.dec.secure".equals(name))) + || (Util.SDK_INT == 19 && Util.MODEL.startsWith("SM-G800") + && ("OMX.Exynos.avc.dec".equals(name) || "OMX.Exynos.avc.dec.secure".equals(name))); } /**