From c5516bf7cc0726be7f2a47b79ec128e64b9d54ee 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/UI/DocumentViews/MpvContainer.cc b/src/UI/DocumentViews/MpvContainer.cc index 9b7b9ed7..b0e712e1 100644 --- a/src/UI/DocumentViews/MpvContainer.cc +++ b/src/UI/DocumentViews/MpvContainer.cc @@ -72,12 +72,13 @@ MpvContainer::closeMpv() noexcept { if (mpv) { qDebug() << "Closing the MPV context"; - asyncCommand(AsyncCmdType::None, { "quit", nullptr }); registerMpvTimeCallback(nullptr); 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