summaryrefslogtreecommitdiffstats
path: root/osdep/macOS_mpv_helper.swift
diff options
context:
space:
mode:
Diffstat (limited to 'osdep/macOS_mpv_helper.swift')
-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