Bug 1154536 - Disable 4k H264 video for vista since it performs poorly. r=ajones, a=sledru
authorMatt Woodrow <mwoodrow@mozilla.com>
Fri, 17 Apr 2015 12:42:09 +1200
changeset 260213 650ed1bb5a04
parent 260212 52322e98f739
child 260214 d1e5b60cd47c
push id721
push userjlund@mozilla.com
push date2015-04-21 23:03 +0000
treeherdermozilla-release@d27c9211ebb3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersajones, sledru
bugs1154536
milestone38.0
Bug 1154536 - Disable 4k H264 video for vista since it performs poorly. r=ajones, a=sledru
dom/media/fmp4/MP4Decoder.cpp
--- a/dom/media/fmp4/MP4Decoder.cpp
+++ b/dom/media/fmp4/MP4Decoder.cpp
@@ -92,16 +92,22 @@ IsSupportedH264Codec(const nsAString& aC
     return false;
   }
 
 #ifdef XP_WIN
   if (!Preferences::GetBool("media.fragmented-mp4.use-blank-decoder") &&
       !WMFDecoderModule::HasH264()) {
     return false;
   }
+
+  // Disable 4k video on windows vista since it performs poorly.
+  if (!IsWin7OrLater() &&
+      level >= H264_LEVEL_5) {
+    return false;
+  }
 #endif
 
   // Just assume what we can play on all platforms the codecs/formats that
   // WMF can play, since we don't have documentation about what other
   // platforms can play... According to the WMF documentation:
   // http://msdn.microsoft.com/en-us/library/windows/desktop/dd797815%28v=vs.85%29.aspx
   // "The Media Foundation H.264 video decoder is a Media Foundation Transform
   // that supports decoding of Baseline, Main, and High profiles, up to level