Add some additional device specific workarounds

Issue: #3355
Issue: #3257

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172587141
This commit is contained in:
olly 2017-10-18 04:46:05 -07:00 committed by Oliver Woodman
parent e54841436b
commit 5357726a8c
2 changed files with 6 additions and 4 deletions

View File

@ -1155,7 +1155,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
*/
private @AdaptationWorkaroundMode int codecAdaptationWorkaroundMode(String 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;
} else if (Util.SDK_INT < 24
&& ("OMX.Nvidia.h264.decode".equals(name) || "OMX.Nvidia.h264.decode.secure".equals(name))

View File

@ -973,9 +973,11 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
* If true is returned then we fall back to releasing and re-instantiating the codec instead.
*/
private static boolean codecNeedsSetOutputSurfaceWorkaround(String name) {
// Work around https://github.com/google/ExoPlayer/issues/3236
return ("deb".equals(Util.DEVICE) || "flo".equals(Util.DEVICE))
&& "OMX.qcom.video.decoder.avc".equals(name);
// Work around https://github.com/google/ExoPlayer/issues/3236 and
// https://github.com/google/ExoPlayer/issues/3355.
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));
}
/**