From 278bc343c260dff67877cb0206f05dd8ed7cca68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toni=20F=C3=B6rster?= Date: Tue, 27 Aug 2024 04:04:23 +0200 Subject: [PATCH] fix mpv crashing on macOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes #712 Signed-off-by: Toni Förster --- Model/Player/Backends/MPVClient.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Model/Player/Backends/MPVClient.swift b/Model/Player/Backends/MPVClient.swift index f33f6e61..ed0a8634 100644 --- a/Model/Player/Backends/MPVClient.swift +++ b/Model/Player/Backends/MPVClient.swift @@ -99,6 +99,11 @@ final class MPVClient: ObservableObject { checkError(mpv_set_option_string(mpv, "demuxer-lavf-analyzeduration", "1")) checkError(mpv_set_option_string(mpv, "demuxer-lavf-probe-info", Defaults[.mpvDemuxerLavfProbeInfo])) + // Disable ytdl, since it causes crashes on macOS. + #if os(macOS) + checkError(mpv_set_option_string(mpv, "ytdl", "no")) + #endif + checkError(mpv_initialize(mpv)) let api = UnsafeMutableRawPointer(mutating: (MPV_RENDER_API_TYPE_OPENGL as NSString).utf8String)