Commit fc5e8ee5 by olly Committed by Oliver Woodman

Add some additional device specific workarounds

Issue: #3355
Issue: #3257

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172587141
parent f9249d23
...@@ -1142,7 +1142,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer { ...@@ -1142,7 +1142,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
*/ */
private @AdaptationWorkaroundMode int codecAdaptationWorkaroundMode(String name) { private @AdaptationWorkaroundMode int codecAdaptationWorkaroundMode(String name) {
if (Util.SDK_INT <= 24 && "OMX.Exynos.avc.dec.secure".equals(name) if (Util.SDK_INT <= 24 && "OMX.Exynos.avc.dec.secure".equals(name)
&& Util.MODEL.startsWith("SM-T585")) { && (Util.MODEL.startsWith("SM-T585") || Util.MODEL.startsWith("SM-A520"))) {
return ADAPTATION_WORKAROUND_MODE_ALWAYS; return ADAPTATION_WORKAROUND_MODE_ALWAYS;
} else if (Util.SDK_INT < 24 } else if (Util.SDK_INT < 24
&& ("OMX.Nvidia.h264.decode".equals(name) || "OMX.Nvidia.h264.decode.secure".equals(name)) && ("OMX.Nvidia.h264.decode".equals(name) || "OMX.Nvidia.h264.decode.secure".equals(name))
......
...@@ -1071,9 +1071,11 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer { ...@@ -1071,9 +1071,11 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
* If true is returned then we fall back to releasing and re-instantiating the codec instead. * If true is returned then we fall back to releasing and re-instantiating the codec instead.
*/ */
private static boolean codecNeedsSetOutputSurfaceWorkaround(String name) { private static boolean codecNeedsSetOutputSurfaceWorkaround(String name) {
// Work around https://github.com/google/ExoPlayer/issues/3236. // Work around https://github.com/google/ExoPlayer/issues/3236 and
return ("deb".equals(Util.DEVICE) || "flo".equals(Util.DEVICE)) // https://github.com/google/ExoPlayer/issues/3355.
&& "OMX.qcom.video.decoder.avc".equals(name); return (("deb".equals(Util.DEVICE) || "flo".equals(Util.DEVICE))
&& "OMX.qcom.video.decoder.avc".equals(name))
|| ("tcl_eu".equals(Util.DEVICE) && "OMX.MTK.VIDEO.DECODER.AVC".equals(name));
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment