From 83aa1371309c7e1b8c75f3f13278a74ecfcabea9 Mon Sep 17 00:00:00 2001
From: Kubat <mael.martin31@gmail.com>
Date: Thu, 9 Sep 2021 09:41:35 +0200
Subject: [PATCH] MPV: Try the same commands as in lektord to close mpv to try
 to solve #5

---
 src/UI/DocumentViews/MpvContainer.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/UI/DocumentViews/MpvContainer.cc b/src/UI/DocumentViews/MpvContainer.cc
index 31e0dc58..7c552c7a 100644
--- a/src/UI/DocumentViews/MpvContainer.cc
+++ b/src/UI/DocumentViews/MpvContainer.cc
@@ -88,8 +88,9 @@ MpvContainer::closeMpv() noexcept
         asyncCommand(AsyncCmdType::None, { "quit", nullptr });
         registerMpvTimeCallback(nullptr);
         registerMpvDurationCallback(nullptr);
+        asyncCommand(AsyncCmdType::None, { "quit", nullptr });
         mpv_wait_async_requests(mpv);
-        mpv_terminate_destroy(mpv);
+        mpv_destroy(mpv);
         mpv                     = nullptr; // Stop all other callbacks here
         isMpvAlreadyInitialized = false;   // De-init
     }
-- 
GitLab