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.
This commit is contained in:
Martin Pulec
2024-05-06 14:34:16 +02:00
parent a9225ff79e
commit 02eeac9ea5

View File

@@ -561,6 +561,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;
}