adapter: call reconfigure_mode instead of configure_convert

configure_convert does not set up the current mode, so call the more
complete reconfigure_mode to set the initial converter mode.
This commit is contained in:
Wim Taymans 2025-03-26 09:43:58 +01:00
parent aea77dc055
commit 6015fa353a
2 changed files with 4 additions and 4 deletions

View file

@ -2172,8 +2172,9 @@ impl_init(const struct spa_handle_factory *factory,
&this->convert_listener, &convert_node_events, this);
if (info && (str = spa_dict_lookup(info, "adapter.auto-port-config")) != NULL)
do_auto_port_config(this, str);
else
configure_convert(this, SPA_PARAM_PORT_CONFIG_MODE_dsp);
else {
reconfigure_mode(this, SPA_PARAM_PORT_CONFIG_MODE_dsp, this->direction, NULL);
}
} else {
reconfigure_mode(this, SPA_PARAM_PORT_CONFIG_MODE_passthrough, this->direction, NULL);
}

View file

@ -2053,10 +2053,9 @@ impl_init(const struct spa_handle_factory *factory,
&this->convert_listener, &convert_node_events, this);
if (strcmp(this->convertname, "video.convert.dummy") == 0) {
configure_convert(this, SPA_PARAM_PORT_CONFIG_MODE_none);
reconfigure_mode(this, SPA_PARAM_PORT_CONFIG_MODE_passthrough, this->direction, NULL);
} else {
configure_convert(this, SPA_PARAM_PORT_CONFIG_MODE_convert);
reconfigure_mode(this, SPA_PARAM_PORT_CONFIG_MODE_convert, this->direction, NULL);
}
} else {
reconfigure_mode(this, SPA_PARAM_PORT_CONFIG_MODE_passthrough, this->direction, NULL);