summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2020-04-28 13:56:23 +0200
committerWim Taymans <wtaymans@redhat.com>2020-04-28 13:56:23 +0200
commit856e1fe81221b05d8973321d879676d15aa7d86e (patch)
tree92ed003bc2a855827ae1561721d4e2ccb95ac4e4
parent9c1ac4e8507fec0f5dd8caba6c9c94aa795f5e5a (diff)
client-node: don't error in cleanup
It's possible the cleanup code might try to clean up ports we already removed, don't show an error on that.
-rw-r--r--src/modules/module-client-node/client-node.c3
-rw-r--r--src/pipewire/private.h4
2 files changed, 4 insertions, 3 deletions
diff --git a/src/modules/module-client-node/client-node.c b/src/modules/module-client-node/client-node.c
index 2626d5a9..ab5f4087 100644
--- a/src/modules/module-client-node/client-node.c
+++ b/src/modules/module-client-node/client-node.c
@@ -660,7 +660,8 @@ static int do_port_set_io(struct impl *impl,
direction == SPA_DIRECTION_INPUT ? "input" : "output",
port_id, mix_id, data, size);
- spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL);
+ if (!CHECK_PORT(this, direction, port_id))
+ return data == NULL ? 0 : -EINVAL;
port = GET_PORT(this, direction, port_id);
diff --git a/src/pipewire/private.h b/src/pipewire/private.h
index 91fd863a..ae6c08b6 100644
--- a/src/pipewire/private.h
+++ b/src/pipewire/private.h
@@ -624,7 +624,7 @@ struct pw_impl_port {
struct spa_hook global_listener;
#define PW_IMPL_PORT_FLAG_TO_REMOVE (1<<0) /**< if the port should be removed from the
- * implementation when destroyed */
+ * implementation when destroyed */
#define PW_IMPL_PORT_FLAG_BUFFERS (1<<1) /**< port has data */
#define PW_IMPL_PORT_FLAG_CONTROL (1<<2) /**< port has control */
#define PW_IMPL_PORT_FLAG_NO_MIXER (1<<3) /**< don't try to add mixer to port */
@@ -653,7 +653,7 @@ struct pw_impl_port {
struct spa_callbacks impl;
struct spa_node *mix; /**< port buffer mix/split */
-#define PW_IMPL_PORT_MIX_FLAG_MULTI (1<<0) /**< multi input or output */
+#define PW_IMPL_PORT_MIX_FLAG_MULTI (1<<0) /**< multi input or output */
#define PW_IMPL_PORT_MIX_FLAG_MIX_ONLY (1<<1) /**< only negotiate mix ports */
#define PW_IMPL_PORT_MIX_FLAG_NEGOTIATE (1<<2) /**< negotiate buffers */
uint32_t mix_flags; /**< flags for the mixing */