summaryrefslogtreecommitdiffstats
path: root/osdep
diff options
context:
space:
mode:
authorAkemi <der.richter@gmx.de>2018-03-16 13:52:15 +0100
committerKevin Mitchell <kevmitch@gmail.com>2018-03-18 12:11:10 -0700
commitaf7b412d1c0b74c63d4d301f5cc5cb2cd32c2108 (patch)
tree49db707141780893a9417be3fb7d1f4edafc3aa3 /osdep
parentfbcf2bf207b45ca9dfb79cad6d0dc981385221a5 (diff)
downloadmpv-af7b412d1c0b74c63d4d301f5cc5cb2cd32c2108.tar.bz2
mpv-af7b412d1c0b74c63d4d301f5cc5cb2cd32c2108.tar.xz
cocoa-cb: fix shutdown when fullscreen animation is running
commit 2edf00f changed the MPV_EVENT_SHUTDOWN behaviour slightly, such that it will only be sent once. cocoa-cb relied on it being sent continuously till all mpv_handles are destroyed. now it manually shuts down and destroys the mpv_handle after the animation instead of relying on this removed behaviour.
Diffstat (limited to 'osdep')
-rw-r--r--osdep/macOS_mpv_helper.swift5
1 files changed, 4 insertions, 1 deletions
diff --git a/osdep/macOS_mpv_helper.swift b/osdep/macOS_mpv_helper.swift
index db650d792c..5d80e7b5b0 100644
--- a/osdep/macOS_mpv_helper.swift
+++ b/osdep/macOS_mpv_helper.swift
@@ -245,7 +245,10 @@ class MPVHelper: NSObject {
mpvRenderContext = nil
}
- func deinitMPV() {
+ func deinitMPV(_ destroy: Bool = false) {
+ if destroy {
+ mpv_destroy(mpvHandle)
+ }
mpvHandle = nil
mpvLog = nil
inputContext = nil