From 00f95eb8ef907fd1a3e0934f7501e66babb7bfca Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Mon, 6 May 2024 14:34:16 +0200 Subject: [PATCH] audio: unregister callback This caused occasional crashes on M1 Mac Pro with `uv --capabilities` (also in macos-14 arm64 GH runner). This was most likely caused by the callback being run just after the audio state has been destroyed. --- src/audio/audio.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/audio/audio.cpp b/src/audio/audio.cpp index 5b04a77d2..5eed748ec 100644 --- a/src/audio/audio.cpp +++ b/src/audio/audio.cpp @@ -560,6 +560,9 @@ void audio_done(struct state_audio *s) audio_codec_done(s->audio_encoder); + unregister_should_exit_callback(get_root_module(s->mod.get()), + should_exit_audio, s); + delete s; }