diff --git a/spa/plugins/v4l2/v4l2-utils.c b/spa/plugins/v4l2/v4l2-utils.c index 26aebc6eb..6a5d0a2a3 100644 --- a/spa/plugins/v4l2/v4l2-utils.c +++ b/spa/plugins/v4l2/v4l2-utils.c @@ -169,6 +169,7 @@ static int spa_v4l2_clear_buffers(struct impl *this) d[0].maxsize - d[0].mapoffset); } if (SPA_FLAG_CHECK(b->flags, BUFFER_FLAG_ALLOCATED)) { + spa_log_debug(this->log, "v4l2: close %d", (int) d[0].fd); close(d[0].fd); } d[0].type = SPA_ID_INVALID; diff --git a/src/modules/module-client-node/client-node.c b/src/modules/module-client-node/client-node.c index 1057d48a0..e920dde17 100644 --- a/src/modules/module-client-node/client-node.c +++ b/src/modules/module-client-node/client-node.c @@ -618,7 +618,7 @@ impl_node_port_set_param(void *object, spa_return_val_if_fail(this != NULL, -EINVAL); spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL); - pw_log_debug(NAME" %p: port %d.%d add param %s %d", this, + pw_log_debug(NAME" %p: port %d.%d set param %s %d", this, direction, port_id, spa_debug_type_find_name(spa_type_param, id), id); @@ -627,8 +627,7 @@ impl_node_port_set_param(void *object, if (id == SPA_PARAM_Format) { for (i = 0; i < MAX_MIX+1; i++) { struct mix *mix = &port->mix[i]; - if (mix->valid) - clear_buffers(this, mix); + clear_buffers(this, mix); } } if (this->resource == NULL) @@ -732,6 +731,9 @@ do_port_use_buffers(struct impl *impl, if (!p->have_format) return -EIO; + if (direction == SPA_DIRECTION_OUTPUT) + mix_id = SPA_ID_INVALID; + if ((mix = find_mix(p, mix_id)) == NULL || !mix->valid) return -EINVAL; @@ -1015,10 +1017,12 @@ static int client_node_port_buffers(void *data, if (!p->have_format) return -EIO; + if (direction == SPA_DIRECTION_OUTPUT) + mix_id = SPA_ID_INVALID; + if ((mix = find_mix(p, mix_id)) == NULL || !mix->valid) return -EINVAL; - for (i = 0; i < n_buffers; i++) { struct spa_buffer *oldbuf, *newbuf;