From c08ef8474544a1fb56b038276e65ed6de6a2b29e Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 11 Jun 2025 10:17:32 +0200 Subject: [PATCH] modules: initialize the latency params Otherwise we get nonsense values for the direction. See #4731 --- src/modules/module-example-filter.c | 2 ++ src/modules/module-filter-chain.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/modules/module-example-filter.c b/src/modules/module-example-filter.c index 271c7c9fe..99ada25d3 100644 --- a/src/modules/module-example-filter.c +++ b/src/modules/module-example-filter.c @@ -542,6 +542,8 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args) impl->module = module; impl->context = context; + impl->latency[SPA_DIRECTION_INPUT] = SPA_LATENCY_INFO(SPA_DIRECTION_INPUT); + impl->latency[SPA_DIRECTION_OUTPUT] = SPA_LATENCY_INFO(SPA_DIRECTION_OUTPUT); if (pw_properties_get(props, PW_KEY_NODE_GROUP) == NULL) pw_properties_setf(props, PW_KEY_NODE_GROUP, "filter-%u-%u", pid, id); diff --git a/src/modules/module-filter-chain.c b/src/modules/module-filter-chain.c index 102eaa827..bc00dcec3 100644 --- a/src/modules/module-filter-chain.c +++ b/src/modules/module-filter-chain.c @@ -1667,6 +1667,8 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args) impl->module = module; impl->context = context; + impl->latency[SPA_DIRECTION_INPUT] = SPA_LATENCY_INFO(SPA_DIRECTION_INPUT); + impl->latency[SPA_DIRECTION_OUTPUT] = SPA_LATENCY_INFO(SPA_DIRECTION_OUTPUT); if (pw_properties_get(props, PW_KEY_NODE_GROUP) == NULL) pw_properties_setf(props, PW_KEY_NODE_GROUP, "filter-chain-%u-%u", pid, id);