From e2f343e84430dea73806b04b8f7863295c1197b9 Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Wed, 20 Sep 2023 21:43:20 -0400 Subject: [PATCH] audiomixer: Correctly initialise data_loop This got missed when it was added in commit 69d431acd49c0229386d4b254367d0d135e6403f. Causes a crash when linking passthrough ports. --- spa/plugins/audiomixer/audiomixer.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spa/plugins/audiomixer/audiomixer.c b/spa/plugins/audiomixer/audiomixer.c index 2dcd32de1..40fc71d47 100644 --- a/spa/plugins/audiomixer/audiomixer.c +++ b/spa/plugins/audiomixer/audiomixer.c @@ -920,6 +920,12 @@ impl_init(const struct spa_handle_factory *factory, this->log = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_Log); 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); if (this->cpu) { this->cpu_flags = spa_cpu_get_flags(this->cpu);