mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
alsa: Move ctl sources to a main loop
It doesn't make sense to hang these on the data loop, so let's have these on the main loop instead. Also avoids a potential crash while removing them (since removal happens on the main loop and the data loop might be polling while we're doing the remove).
This commit is contained in:
parent
bb82ddb601
commit
dec1102574
4 changed files with 13 additions and 2 deletions
|
|
@ -873,7 +873,12 @@ impl_init(const struct spa_handle_factory *factory,
|
|||
|
||||
this->data_system = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_DataSystem);
|
||||
this->data_loop = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_DataLoop);
|
||||
this->main_loop = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_Loop);
|
||||
|
||||
if (this->main_loop == NULL) {
|
||||
spa_log_error(this->log, "a main loop is needed");
|
||||
return -EINVAL;
|
||||
}
|
||||
if (this->data_loop == NULL) {
|
||||
spa_log_error(this->log, "a data loop is needed");
|
||||
return -EINVAL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue