mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
audioconvert: reset converter format as well
Reset the format of the converter so that when we go back to DSP mode, we don't expose the old ports again. .
This commit is contained in:
parent
8f7a972a48
commit
2427eeae2b
1 changed files with 6 additions and 7 deletions
|
|
@ -725,17 +725,17 @@ static int reconfigure_mode(struct impl *this, enum spa_param_port_config_mode m
|
|||
|
||||
this->mode[direction] = mode;
|
||||
|
||||
if (info && new != NULL) {
|
||||
if (new != NULL) {
|
||||
struct spa_pod_builder b = { 0 };
|
||||
uint8_t buffer[1024];
|
||||
struct spa_pod *param;
|
||||
|
||||
spa_log_debug(this->log, NAME " %p: port config %d", this, info->info.raw.channels);
|
||||
struct spa_pod *param = NULL;
|
||||
|
||||
spa_pod_builder_init(&b, buffer, sizeof(buffer));
|
||||
|
||||
if (info) {
|
||||
spa_log_info(this->log, NAME " %p: port config %d", this, info->info.raw.channels);
|
||||
param = spa_format_audio_raw_build(&b, SPA_PARAM_Format, &info->info.raw);
|
||||
|
||||
}
|
||||
if (mode == SPA_PARAM_PORT_CONFIG_MODE_dsp) {
|
||||
param = spa_pod_builder_add_object(&b,
|
||||
SPA_TYPE_OBJECT_ParamPortConfig, SPA_PARAM_PortConfig,
|
||||
|
|
@ -748,7 +748,6 @@ static int reconfigure_mode(struct impl *this, enum spa_param_port_config_mode m
|
|||
res = spa_node_port_set_param(this->fmt[direction], direction, 0,
|
||||
SPA_PARAM_Format, 0, param);
|
||||
}
|
||||
|
||||
if (res < 0)
|
||||
return res;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue