aboutsummaryrefslogtreecommitdiff
path: root/src/VideoPlayer.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-08-09 15:54:44 +0200
committerdec05eba <dec05eba@protonmail.com>2019-08-09 15:55:18 +0200
commit322513ac417aa7002946a3f203ae1a65f959677a (patch)
tree95144d28741e79b637159c8ddb1a11fe6accf6ef /src/VideoPlayer.cpp
parent10fcdec298ccef4971dc6d109222079a0f438004 (diff)
Wait until mpv process dies (prevent zombie), fix crash that happens sometimes when quiting video
Diffstat (limited to 'src/VideoPlayer.cpp')
-rw-r--r--src/VideoPlayer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/VideoPlayer.cpp b/src/VideoPlayer.cpp
index 0e6735a..65bbb67 100644
--- a/src/VideoPlayer.cpp
+++ b/src/VideoPlayer.cpp
@@ -38,8 +38,10 @@ namespace QuickMedia {
}
VideoPlayer::~VideoPlayer() {
- if(video_process_id != -1)
+ if(video_process_id != -1) {
kill(video_process_id, SIGTERM);
+ wait_program(video_process_id);
+ }
if(ipc_socket != -1)
close(ipc_socket);