From 5ae73fccdd36d2733a5a69c69cf48505cef3d9c0 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 29 Mar 2023 15:31:21 +0200 Subject: [PATCH] alsa: only update alsa sources when added to the data loop --- spa/plugins/alsa/alsa-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spa/plugins/alsa/alsa-pcm.c b/spa/plugins/alsa/alsa-pcm.c index 0ffcf0230..5d47240a0 100644 --- a/spa/plugins/alsa/alsa-pcm.c +++ b/spa/plugins/alsa/alsa-pcm.c @@ -2037,7 +2037,7 @@ static int setup_matching(struct state *state) static void update_sources(struct state *state, bool active) { - if (state->disable_tsched) { + if (state->disable_tsched && state->source[0].data != NULL) { for (int i = 0; i < state->n_fds; i++) { state->source[i].mask = active ? state->pfds[i].events : 0; spa_loop_update_source(state->data_loop, &state->source[i]);