summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorAkemi <der.richter@gmx.de>2018-07-30 19:56:30 +0200
committersfan5 <sfan5@live.de>2018-08-11 12:59:50 +0200
commit049816c1451449932f1ed2047f6643d7c7ac8a63 (patch)
tree56f3e1a66f9be859831533e6e9e129fb146e13b4 /video/out
parent6bf0edc59cc377705a44fcb30890592aaaff79c0 (diff)
downloadmpv-049816c1451449932f1ed2047f6643d7c7ac8a63.tar.bz2
mpv-049816c1451449932f1ed2047f6643d7c7ac8a63.tar.xz
cocoa-cb: fix crash on macOS 10.10
the colorspace of the layer is only available on 10.11 and upwards. Fixes #6041
Diffstat (limited to 'video/out')
-rw-r--r--video/out/cocoa_cb_common.swift4
1 files changed, 3 insertions, 1 deletions
diff --git a/video/out/cocoa_cb_common.swift b/video/out/cocoa_cb_common.swift
index a4aae9ff2a..1865cc9b5c 100644
--- a/video/out/cocoa_cb_common.swift
+++ b/video/out/cocoa_cb_common.swift
@@ -241,7 +241,9 @@ class CocoaCB: NSObject {
func updateICCProfile() {
mpv.setRenderICCProfile(window.screen!.colorSpace!)
- layer.colorspace = window.screen!.colorSpace!.cgColorSpace!
+ if #available(macOS 10.11, *) {
+ layer.colorspace = window.screen!.colorSpace!.cgColorSpace!
+ }
}
func lmuToLux(_ v: UInt64) -> Int {