Bug 1672901 - Fix failure to build with 11.0 macOS SDK. r=jya
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 27 Oct 2020 03:01:41 +0000
changeset 554579 46a0e993f8bb4eeca12cbfbe21efd19c75592d35
parent 554578 82dc435b2c6d2a638e7ee0ffdfcfd2dd1b478075
child 554580 3b5b7c400d6fdad6e54367457155dabb49bb66df
push id37894
push userdluca@mozilla.com
push dateTue, 27 Oct 2020 04:41:26 +0000
treeherdermozilla-central@46a0e993f8bb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya
bugs1672901
milestone84.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 1672901 - Fix failure to build with 11.0 macOS SDK. r=jya Differential Revision: https://phabricator.services.mozilla.com/D94561
dom/media/platforms/apple/AppleDecoderModule.cpp
--- a/dom/media/platforms/apple/AppleDecoderModule.cpp
+++ b/dom/media/platforms/apple/AppleDecoderModule.cpp
@@ -148,19 +148,21 @@ bool AppleDecoderModule::CanCreateVP9Dec
   }
 
   return false;
 }
 
 /* static */
 bool AppleDecoderModule::RegisterSupplementalVP9Decoder() {
   static bool sRegisterIfAvailable = []() {
-    if (VTRegisterSupplementalVideoDecoderIfAvailable) {
-      VTRegisterSupplementalVideoDecoderIfAvailable(kCMVideoCodecType_VP9);
-      return true;
+    if (__builtin_available(macos 10.16, *)) {
+      if (VTRegisterSupplementalVideoDecoderIfAvailable) {
+        VTRegisterSupplementalVideoDecoderIfAvailable(kCMVideoCodecType_VP9);
+        return true;
+      }
     }
     return false;
   }();
   return sRegisterIfAvailable;
 }
 
 /* static */
 already_AddRefed<PlatformDecoderModule> AppleDecoderModule::Create() {