Bug 1097126 - Restrict MediaCodec backend to Android 5.0 and higher r=blassey a=lmandel
authorJames Willcox <snorp@snorp.net>
Tue, 18 Nov 2014 17:28:50 -0600
changeset 227363 cc4419d99df32413d1c3daec8d2ed4f14564b782
parent 227362 058acc4d0acde9cbe7b90b6c80813fe5555aee6d
child 227364 fb7eba66b969f0efcdd7644bb274ebce1af37ac4
child 227366 69d50177865bd66bcceea18bfbcaa53b88ffb4a5
push id583
push userbhearsum@mozilla.com
push dateMon, 24 Nov 2014 19:04:58 +0000
treeherdermozilla-release@c107e74250f4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersblassey, lmandel
bugs1097126
milestone34.0
Bug 1097126 - Restrict MediaCodec backend to Android 5.0 and higher r=blassey a=lmandel
content/media/fmp4/MP4Decoder.cpp
--- a/content/media/fmp4/MP4Decoder.cpp
+++ b/content/media/fmp4/MP4Decoder.cpp
@@ -178,18 +178,18 @@ static bool
 HavePlatformMPEGDecoders()
 {
   return Preferences::GetBool("media.fragmented-mp4.use-blank-decoder") ||
 #ifdef XP_WIN
          // We have H.264/AAC platform decoders on Windows Vista and up.
          IsVistaOrLater() ||
 #endif
 #ifdef MOZ_WIDGET_ANDROID
-         // We need android.media.MediaCodec which exists in API level 16 and higher.
-         (AndroidBridge::Bridge()->GetAPIVersion() >= 16) ||
+         // Works on 16 and higher, but restrict to 21 (Lollipop) and higher
+         (AndroidBridge::Bridge()->GetAPIVersion() >= 21) ||
 #endif
          IsFFmpegAvailable() ||
          IsAppleAvailable() ||
          IsGonkMP4DecoderAvailable() ||
          // TODO: Other platforms...
          false;
 }