From e9e14bc495a9fc8ece2856127436e9af7f512ad1 Mon Sep 17 00:00:00 2001
From: Kubat <mael.martin31@gmail.com>
Date: Wed, 8 Sep 2021 14:30:18 +0200
Subject: [PATCH] MPV: Use mpv_destroy to delete the player, don't use the
 "quit" command as it seems to be the way recommended in the client.h header

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

diff --git a/src/UI/DocumentViews/MpvContainer.cc b/src/UI/DocumentViews/MpvContainer.cc
index 864daf03..b6f30f4c 100644
--- a/src/UI/DocumentViews/MpvContainer.cc
+++ b/src/UI/DocumentViews/MpvContainer.cc
@@ -77,7 +77,9 @@ MpvContainer::closeMpv() noexcept
         registerMpvDurationCallback(nullptr);
         mpv_handle *tmp_mpv = mpv;
         mpv                 = nullptr; // Stop all other callbacks here
-        mpv_terminate_destroy(tmp_mpv);
+        mpv_destroy(tmp_mpv);
+        // mpv_wait_async_requests(tmp_mpv);
+        // mpv_terminate_destroy(tmp_mpv);
     }
 }
 
-- 
GitLab