diff --git a/library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java b/library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java index 2bc3ff285f..529704c62e 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java @@ -337,7 +337,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer { } String codecName = decoderInfo.name; - codecIsAdaptive = decoderInfo.adaptive && codecSupportsAdaptive(codecName, format); + codecIsAdaptive = decoderInfo.adaptive && (codecNeedsDisableAdaptationWorkaround(codecName)==false); codecNeedsDiscardToSpsWorkaround = codecNeedsDiscardToSpsWorkaround(codecName, format); codecNeedsFlushWorkaround = codecNeedsFlushWorkaround(codecName); codecNeedsAdaptationWorkaround = codecNeedsAdaptationWorkaround(codecName); @@ -1171,18 +1171,16 @@ public abstract class MediaCodecRenderer extends BaseRenderer { && "OMX.MTK.AUDIO.DECODER.MP3".equals(name); } /** - * Returns whether the decoder is known to be non Adaptive. + * Returns whether the decoder is needs Apaptive workaround disabled *
* If false is returned then we explicitly override codecIsAdaptive, * setting it to false. * - * @param name The decoder name. - * @param format The input format. - * @return False if the device is known to be non adaptive . + * @return TRUE if the device needs Adaptive workaround disabled */ - private static boolean codecSupportsAdaptive(String name, Format format) { - return !( - (Util.SDK_INT == 19 && Util.MODEL.equals("ODROID-XU3") + private static boolean codecNeedsDisableAdaptationWorkaround(String name) { + return ( + (Util.SDK_INT <= 19 && Util.MODEL.equals("ODROID-XU3") && ("OMX.Exynos.AVC.Decoder".equals(name) || "OMX.Exynos.AVC.Decoder.secure".equals(name)))); } }