Only allow MediaTek H264 HW Codec for O_MR1 or later
Bug: webrtc:8761
Change-Id: I3e5a1d97a5e89cb95bb94c2e892be1f3e63e9383
Reviewed-on: https://webrtc-review.googlesource.com/48200
Reviewed-by: Alex Glaznev <glaznev@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21900}
diff --git a/sdk/android/api/org/webrtc/MediaCodecVideoDecoder.java b/sdk/android/api/org/webrtc/MediaCodecVideoDecoder.java
index cc014fa..def4299 100644
--- a/sdk/android/api/org/webrtc/MediaCodecVideoDecoder.java
+++ b/sdk/android/api/org/webrtc/MediaCodecVideoDecoder.java
@@ -104,7 +104,7 @@
supportedPrefixes.add("OMX.Intel.");
supportedPrefixes.add("OMX.Exynos.");
if (PeerConnectionFactory.fieldTrialsFindFullName("WebRTC-MediaTekH264").equals("Enabled")
- && Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+ && Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1) {
supportedPrefixes.add("OMX.MTK.");
}
return supportedPrefixes.toArray(new String[supportedPrefixes.size()]);
@@ -210,9 +210,9 @@
!= null) {
return true;
}
- // Support H.264 HP decoding on MediaTek chips for Android O and above
+ // Support H.264 HP decoding on MediaTek chips for Android O_MR1 and above
if (PeerConnectionFactory.fieldTrialsFindFullName("WebRTC-MediaTekH264").equals("Enabled")
- && Build.VERSION.SDK_INT >= Build.VERSION_CODES.O
+ && Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1
&& findDecoder(H264_MIME_TYPE, new String[] {supportedMediaTekH264HighProfileHwCodecPrefix})
!= null) {
return true;