From 008df86c8fbd28270131c1e134967a3fce16b153 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 11 Apr 2018 10:54:47 +0200 Subject: [PATCH] small cleanups --- spa/plugins/audioconvert/audioconvert.c | 6 ------ src/modules/module-client-node/client-node.c | 2 +- src/pipewire/stream.c | 12 ++++++++++-- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/spa/plugins/audioconvert/audioconvert.c b/spa/plugins/audioconvert/audioconvert.c index 917057115..9477e3e75 100644 --- a/spa/plugins/audioconvert/audioconvert.c +++ b/spa/plugins/audioconvert/audioconvert.c @@ -226,9 +226,6 @@ static int negotiate_link_format(struct impl *this, struct link *link) else filter = NULL; - if (filter) - spa_debug_pod(filter, SPA_DEBUG_FLAG_FORMAT); - if (link->out_node != NULL) { state = 0; if ((res = spa_node_port_enum_params(link->out_node, @@ -239,8 +236,6 @@ static int negotiate_link_format(struct impl *this, struct link *link) filter = format; } - if (filter) - spa_debug_pod(filter, SPA_DEBUG_FLAG_FORMAT); if (link->in_node != NULL) { state = 0; if ((res = spa_node_port_enum_params(link->in_node, @@ -253,7 +248,6 @@ static int negotiate_link_format(struct impl *this, struct link *link) } spa_pod_fixate(filter); - spa_debug_pod(filter, SPA_DEBUG_FLAG_FORMAT); if (link->out_node != NULL) { if ((res = spa_node_port_set_param(link->out_node, diff --git a/src/modules/module-client-node/client-node.c b/src/modules/module-client-node/client-node.c index 3cd8489fa..5a36cd518 100644 --- a/src/modules/module-client-node/client-node.c +++ b/src/modules/module-client-node/client-node.c @@ -811,7 +811,7 @@ impl_node_port_use_buffers(struct spa_node *node, size += d->maxsize; } else { b->buffer.datas[j].type = SPA_ID_INVALID; - b->buffer.datas[j].data = 0; + b->buffer.datas[j].data = NULL; spa_log_error(this->log, "invalid memory type %d", d->type); } } diff --git a/src/pipewire/stream.c b/src/pipewire/stream.c index 81bbc28f2..44fbff304 100644 --- a/src/pipewire/stream.c +++ b/src/pipewire/stream.c @@ -353,8 +353,16 @@ static int impl_get_port_ids(struct spa_node *node, uint32_t *output_ids, uint32_t n_output_ids) { - if (n_output_ids > 0) - output_ids[0] = 0; + struct stream *impl = SPA_CONTAINER_OF(node, struct stream, impl_node); + + if (impl->direction == SPA_DIRECTION_INPUT) { + if (n_input_ids > 0) + input_ids[0] = 0; + } + else { + if (n_output_ids > 0) + output_ids[0] = 0; + } return 0; }