diff options
author | xengineering <me@xengineering.eu> | 2024-11-08 19:34:51 +0100 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2024-11-08 19:34:51 +0100 |
commit | c5b70859438b22e0e186c57037aee02adde5399b (patch) | |
tree | 614177aed44d9b91eb4c68a61f69b74aad09973e | |
parent | dbc0b05e4bbd939cd4dce6cadb833a860ff2c0d5 (diff) | |
download | soundbox-app-c5b70859438b22e0e186c57037aee02adde5399b.tar soundbox-app-c5b70859438b22e0e186c57037aee02adde5399b.tar.zst soundbox-app-c5b70859438b22e0e186c57037aee02adde5399b.zip |
Fix zombie ffmpeg process
In case of closing the UI window while the player was active the
`ffmpeg` process continued while soundbox-app was closed. This is highly
unwanted behavior since the user is not able to stop it without advanced
tools.
Waiting properly for the player context to be done solves the issue.
-rw-r--r-- | main.go | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -75,7 +75,9 @@ func (ui *Ui) Cleanup() { defer ui.State.Unlock() if ui.State.PlayerCancel != nil { + done := ui.State.PlayerContext.Done() ui.State.PlayerCancel() + <-done } } |