alsa: destroy stream first and then context

This makes things more deterministic.
This commit is contained in:
Wim Taymans 2021-09-15 15:49:57 +02:00
parent eca2bbb892
commit f6f10669a0

View file

@ -149,6 +149,8 @@ static void snd_pcm_pipewire_free(snd_pcm_pipewire_t *pw)
pw_log_debug(NAME" %p:", pw);
if (pw->main_loop)
pw_thread_loop_stop(pw->main_loop);
if (pw->stream)
pw_stream_destroy(pw->stream);
if (pw->context)
pw_context_destroy(pw->context);
if (pw->fd >= 0)