diff options
author | Akemi <der.richter@gmx.de> | 2018-07-30 19:56:30 +0200 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2018-08-11 12:59:50 +0200 |
commit | 049816c1451449932f1ed2047f6643d7c7ac8a63 (patch) | |
tree | 56f3e1a66f9be859831533e6e9e129fb146e13b4 /video/out/cocoa_cb_common.swift | |
parent | 6bf0edc59cc377705a44fcb30890592aaaff79c0 (diff) | |
download | mpv-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/cocoa_cb_common.swift')
-rw-r--r-- | video/out/cocoa_cb_common.swift | 4 |
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 { |