mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
alsa-seq: add the source only on success
Otherwise if we have an error with the timerfd, we have the source fd added and we close the device.
This commit is contained in:
parent
41665e6bb8
commit
7e4dd9524f
1 changed files with 2 additions and 1 deletions
|
|
@ -404,7 +404,6 @@ int spa_alsa_seq_open(struct seq_state *state)
|
|||
|
||||
state->sys.source.func = alsa_seq_on_sys;
|
||||
state->sys.source.data = state;
|
||||
spa_loop_add_source(state->main_loop, &state->sys.source);
|
||||
|
||||
/* increase event queue timer resolution */
|
||||
snd_seq_queue_timer_alloca(&timer);
|
||||
|
|
@ -449,6 +448,8 @@ int spa_alsa_seq_open(struct seq_state *state)
|
|||
|
||||
state->timerfd = res;
|
||||
|
||||
spa_loop_add_source(state->main_loop, &state->sys.source);
|
||||
|
||||
state->opened = true;
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue