si-adapter: use a different g_autoptr for port_format

This commit is contained in:
Julian Bouzas 2020-05-14 13:37:16 -04:00
parent b2431132ca
commit 1acdb2a89b

View file

@ -306,7 +306,7 @@ si_adapter_activate_execute_step (WpSessionItem * item,
break;
case STEP_CONFIGURE_PORTS: {
g_autoptr (WpSpaPod) format = NULL;
g_autoptr (WpSpaPod) format = NULL, port_format = NULL;
g_autoptr (WpSpaPod) pod = NULL;
/* set the chosen device/client format on the node */
@ -317,13 +317,13 @@ si_adapter_activate_execute_step (WpSessionItem * item,
self->format.format = SPA_AUDIO_FORMAT_F32P;
self->format.rate = 48000;
format = format_audio_raw_build (&self->format);
port_format = format_audio_raw_build (&self->format);
pod = wp_spa_pod_new_object ("PortConfig", "PortConfig",
"direction", "I", self->direction,
"mode", "I", SPA_PARAM_PORT_CONFIG_MODE_dsp,
"monitor", "b", self->monitor,
"control", "b", self->control_port,
"format", "P", format,
"format", "P", port_format,
NULL);
wp_proxy_set_param (WP_PROXY (self->node), SPA_PARAM_PortConfig, 0, pod);