fix: darwin playback crash

This commit is contained in:
edde746
2025-12-03 06:16:19 +01:00
parent a6f0a0b6c0
commit 78a5ff0fe0
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -27,7 +27,7 @@ private class MetalLayer: CAMetalLayer {
if Thread.isMainThread {
super.wantsExtendedDynamicRangeContent = newValue
} else {
DispatchQueue.main.sync {
DispatchQueue.main.async {
super.wantsExtendedDynamicRangeContent = newValue
}
}
@@ -113,7 +113,7 @@ class MpvPlayerCore: NSObject {
checkError(mpv_set_option_string(mpv, "vo", "gpu-next"))
checkError(mpv_set_option_string(mpv, "gpu-api", "vulkan"))
checkError(mpv_set_option_string(mpv, "gpu-context", "moltenvk"))
// hwdec is set from Flutter via setProperty based on user preference
checkError(mpv_set_option_string(mpv, "hwdec", "videotoolbox"))
// Initialize MPV
let initResult = mpv_initialize(mpv)