diff options
author | Akemi <der.richter@gmx.de> | 2018-07-30 19:56:30 +0200 |
---|---|---|
committer | Jan Ekström <jeebjp@gmail.com> | 2018-09-29 22:22:20 +0300 |
commit | a4e7580c5a8bc3d25bb7ad0a1f52105c07b9dd82 (patch) | |
tree | 958b31478fb9017edea6840bd13ee39c57cf6101 | |
parent | 7b91bf7f202730206ca092c64776ef6f158ea2df (diff) | |
download | mpv-a4e7580c5a8bc3d25bb7ad0a1f52105c07b9dd82.tar.bz2 mpv-a4e7580c5a8bc3d25bb7ad0a1f52105c07b9dd82.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
(cherry picked from commit 049816c1451449932f1ed2047f6643d7c7ac8a63)
-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 { |