Index: media/base/android/java/src/org/chromium/media/MediaCodecUtil.java |
diff --git a/media/base/android/java/src/org/chromium/media/MediaCodecUtil.java b/media/base/android/java/src/org/chromium/media/MediaCodecUtil.java |
index a8adcd7beb2d8df1ef4f26be5608c9f6da7f2387..f6d97af9f23fd9c05cb4d45dcdbe26f5cffca74e 100644 |
--- a/media/base/android/java/src/org/chromium/media/MediaCodecUtil.java |
+++ b/media/base/android/java/src/org/chromium/media/MediaCodecUtil.java |
@@ -239,6 +239,12 @@ class MediaCodecUtil { |
// *** DO NOT ADD ANY NEW CODECS WITHOUT UPDATING MIME_UTIL. *** |
// ************************************************************* |
if (mime.equals("video/x-vnd.on2.vp8")) { |
+ // Only support VP8 on Android versions where we don't have to synchronously |
+ // tear down the MediaCodec on surface destruction because VP8 requires us to |
+ // completely drain the decoder before releasing it, which is difficult and |
+ // time consuming to do while the surface is being destroyed. |
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) return false; |
+ |
if (Build.MANUFACTURER.toLowerCase(Locale.getDefault()).equals("samsung")) { |
// Some Samsung devices cannot render VP8 video directly to the surface. |