audiomixer: Correctly initialise data_loop

This got missed when it was added in commit
69d431acd4. Causes a crash when linking
passthrough ports.
This commit is contained in:
Arun Raghavan 2023-09-20 21:43:20 -04:00
parent cc0eb1ba0d
commit e2f343e844

View file

@ -920,6 +920,12 @@ impl_init(const struct spa_handle_factory *factory,
this->log = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_Log); this->log = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_Log);
spa_log_topic_init(this->log, log_topic); spa_log_topic_init(this->log, log_topic);
this->data_loop = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_DataLoop);
if (this->data_loop == NULL) {
spa_log_error(this->log, "a data loop is needed");
return -EINVAL;
}
this->cpu = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_CPU); this->cpu = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_CPU);
if (this->cpu) { if (this->cpu) {
this->cpu_flags = spa_cpu_get_flags(this->cpu); this->cpu_flags = spa_cpu_get_flags(this->cpu);