mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
client-stream: only add link once
This commit is contained in:
parent
24117b33c7
commit
132dd760ee
2 changed files with 6 additions and 3 deletions
|
|
@ -181,6 +181,9 @@ static void try_link_controls(struct impl *impl)
|
||||||
if (!impl->use_converter)
|
if (!impl->use_converter)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (impl->control.valid || impl->notify.valid)
|
||||||
|
return;
|
||||||
|
|
||||||
target = pw_node_find_port(impl->this.node, impl->direction, 0);
|
target = pw_node_find_port(impl->this.node, impl->direction, 0);
|
||||||
|
|
||||||
if (target == NULL) {
|
if (target == NULL) {
|
||||||
|
|
|
||||||
|
|
@ -92,18 +92,18 @@ pw_control_new(struct pw_core *core,
|
||||||
void pw_control_destroy(struct pw_control *control)
|
void pw_control_destroy(struct pw_control *control)
|
||||||
{
|
{
|
||||||
struct impl *impl = SPA_CONTAINER_OF(control, struct impl, this);
|
struct impl *impl = SPA_CONTAINER_OF(control, struct impl, this);
|
||||||
struct pw_control_link *link, *tmp;
|
struct pw_control_link *link;
|
||||||
|
|
||||||
pw_log_debug("control %p: destroy", control);
|
pw_log_debug("control %p: destroy", control);
|
||||||
|
|
||||||
pw_control_emit_destroy(control);
|
pw_control_emit_destroy(control);
|
||||||
|
|
||||||
if (control->direction == SPA_DIRECTION_OUTPUT) {
|
if (control->direction == SPA_DIRECTION_OUTPUT) {
|
||||||
spa_list_for_each_safe(link, tmp, &control->links, out_link)
|
spa_list_consume(link, &control->links, out_link)
|
||||||
pw_control_remove_link(link);
|
pw_control_remove_link(link);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
spa_list_for_each_safe(link, tmp, &control->links, in_link)
|
spa_list_consume(link, &control->links, in_link)
|
||||||
pw_control_remove_link(link);
|
pw_control_remove_link(link);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue