Bug 1437003 - Allow H264 level up to 5.2 inclusive. r=padenot
authorJean-Yves Avenard <jyavenard@mozilla.com>
Thu, 01 Mar 2018 09:38:45 +0100
changeset 461045 8e31ba435fa80983e2fb84958fd1f6fbbb1b51ea
parent 461044 98f2913853d4945a3a370bbbe588c2f6046fca55
child 461046 fb544e206108dedd39a8dfac98a06116f039fc2a
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot
bugs1437003
milestone60.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1437003 - Allow H264 level up to 5.2 inclusive. r=padenot MozReview-Commit-ID: KiwVH9BUGrV
dom/media/mp4/MP4Decoder.cpp
--- a/dom/media/mp4/MP4Decoder.cpp
+++ b/dom/media/mp4/MP4Decoder.cpp
@@ -24,20 +24,22 @@ IsWhitelistedH264Codec(const nsAString& 
   }
 
   // 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
-  // 5.1.". We also report that we can play Extended profile, as there are
+  // 5.1.". We extend the limit to level 5.2, relying on the decoder to handle
+  // any potential errors, the level limit being rather arbitrary.
+  // We also report that we can play Extended profile, as there are
   // bitstreams that are Extended compliant that are also Baseline compliant.
   return level >= H264_LEVEL_1 &&
-         level <= H264_LEVEL_5_1 &&
+         level <= H264_LEVEL_5_2 &&
          (profile == H264_PROFILE_BASE ||
           profile == H264_PROFILE_MAIN ||
           profile == H264_PROFILE_EXTENDED ||
           profile == H264_PROFILE_HIGH);
 }
 
 /* static */
 bool