MediaToolbox may not be available; check before calling MTOverrideShouldPlayHDRVideo()
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Feb 2020 03:48:34 +0000 (03:48 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Feb 2020 03:48:34 +0000 (03:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=207733
<rdar://problem/59441647>

Reviewed by Maciej Stachowiak.

* platform/mac/PlatformScreenMac.mm:
(WebCore::setShouldOverrideScreenSupportsHighDynamicRange):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@256584 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/mac/PlatformScreenMac.mm

index 4c2d446..1fba27f 100644 (file)
@@ -1,3 +1,14 @@
+2020-02-13  Jer Noble  <jer.noble@apple.com>
+
+        MediaToolbox may not be available; check before calling MTOverrideShouldPlayHDRVideo()
+        https://bugs.webkit.org/show_bug.cgi?id=207733
+        <rdar://problem/59441647>
+
+        Reviewed by Maciej Stachowiak.
+
+        * platform/mac/PlatformScreenMac.mm:
+        (WebCore::setShouldOverrideScreenSupportsHighDynamicRange):
+
 2020-02-13  Kate Cheney  <katherine_cheney@apple.com>
 
         Expose prevalent domains on a per-page basis
index be71ccd..8570661 100644 (file)
@@ -158,7 +158,7 @@ void setScreenProperties(const ScreenProperties& properties)
 
 void setShouldOverrideScreenSupportsHighDynamicRange(bool shouldOverride, bool supportsHighDynamicRange)
 {
-    if (PAL::canLoad_MediaToolbox_MTOverrideShouldPlayHDRVideo())
+    if (PAL::isMediaToolboxFrameworkAvailable() && PAL::canLoad_MediaToolbox_MTOverrideShouldPlayHDRVideo())
         PAL::softLink_MediaToolbox_MTOverrideShouldPlayHDRVideo(shouldOverride, supportsHighDynamicRange);
 }