client-node: set port data before calling _set_mix()

First set some of the port flags and data, especially the owner_data
before calling pw_impl_port_set_mix(), which will use the owner_data
to send the mix_info.

See #2847
This commit is contained in:
Barnabás Pőcze 2022-11-21 20:15:39 +01:00 committed by Wim Taymans
parent 8e9b136b10
commit 67e77d13f6

View file

@ -1558,14 +1558,14 @@ static void node_port_added(void *data, struct pw_impl_port *port)
struct impl *impl = data;
struct port *p = pw_impl_port_get_user_data(port);
pw_impl_port_set_mix(port, &p->mix_node,
PW_IMPL_PORT_MIX_FLAG_MULTI |
PW_IMPL_PORT_MIX_FLAG_MIX_ONLY);
port->flags |= PW_IMPL_PORT_FLAG_NO_MIXER;
port->impl = SPA_CALLBACKS_INIT(&port_impl, p);
port->owner_data = impl;
pw_impl_port_set_mix(port, &p->mix_node,
PW_IMPL_PORT_MIX_FLAG_MULTI |
PW_IMPL_PORT_MIX_FLAG_MIX_ONLY);
}
static void node_port_removed(void *data, struct pw_impl_port *port)