actually copy relevant props if control or feedback stream enabled

This commit is contained in:
Frank Krick 2025-08-28 19:36:41 -04:00
parent cec3130c77
commit 2a62e6e977

View file

@ -2293,6 +2293,15 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
copy_props(impl, props, PW_KEY_MEDIA_NAME);
copy_props(impl, props, "resample.prefill");
impl->control_stream_active = pw_properties_get_bool(impl->control_props, "enabled", false);
impl->feedback_stream_active = pw_properties_get_bool(impl->feedback_props, "enabled", false);
if (impl->feedback_stream_active) {
spa_ringbuffer_init(&impl->feedback_ringbuffer);
impl->feedback_ringbuffer_data = malloc(DEFAULT_FEEDBACK_BUFFER_SIZE);
impl->feedback_ringbuffer_size = DEFAULT_FEEDBACK_BUFFER_SIZE;
}
copy_props_control(impl, props, PW_KEY_NODE_DESCRIPTION);
copy_props_control(impl, props, PW_KEY_NODE_GROUP);
copy_props_control(impl, props, PW_KEY_NODE_LINK_GROUP);
@ -2390,15 +2399,6 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
&impl->core_listener,
&core_events, impl);
impl->control_stream_active = pw_properties_get_bool(impl->control_props, "enabled", false);
impl->feedback_stream_active = pw_properties_get_bool(impl->feedback_props, "enabled", false);
if (impl->feedback_stream_active) {
spa_ringbuffer_init(&impl->feedback_ringbuffer);
impl->feedback_ringbuffer_data = malloc(DEFAULT_FEEDBACK_BUFFER_SIZE);
impl->feedback_ringbuffer_size = DEFAULT_FEEDBACK_BUFFER_SIZE;
}
setup_streams(impl);
pw_impl_module_add_listener(module, &impl->module_listener, &module_events, impl);