From 1a7fcaf9c6b13e31405a023ba0be9ad78678af06 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 10 May 2019 11:15:48 +0200 Subject: [PATCH] Fix cleanup --- spa/plugins/audioconvert/channelmix.c | 3 ++- spa/plugins/audioconvert/fmtconvert.c | 2 +- src/modules/module-client-node/remote-node.c | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/spa/plugins/audioconvert/channelmix.c b/spa/plugins/audioconvert/channelmix.c index 5f7bd9acd..825482fe3 100644 --- a/spa/plugins/audioconvert/channelmix.c +++ b/spa/plugins/audioconvert/channelmix.c @@ -633,8 +633,9 @@ static int port_set_format(struct spa_node *node, if (port->have_format) { port->have_format = false; clear_buffers(this, port); + if (this->mix.process) + channelmix_free(&this->mix); } - channelmix_free(&this->mix); } else { struct spa_audio_info info = { 0 }; diff --git a/spa/plugins/audioconvert/fmtconvert.c b/spa/plugins/audioconvert/fmtconvert.c index de87d3690..9fbe64b6c 100644 --- a/spa/plugins/audioconvert/fmtconvert.c +++ b/spa/plugins/audioconvert/fmtconvert.c @@ -553,7 +553,7 @@ static int port_set_format(struct spa_node *node, if (port->have_format) { port->have_format = false; clear_buffers(this, port); - if (this->conv.free) + if (this->conv.process) convert_free(&this->conv); } } else { diff --git a/src/modules/module-client-node/remote-node.c b/src/modules/module-client-node/remote-node.c index f69a6f363..63834f8d1 100644 --- a/src/modules/module-client-node/remote-node.c +++ b/src/modules/module-client-node/remote-node.c @@ -653,7 +653,8 @@ client_node_port_set_param(void *object, port = pw_node_find_port(data->node, direction, port_id); if (port == NULL) { res = -EINVAL; - pw_proxy_error(proxy, res, "unknown port"); + pw_proxy_error(proxy, res, "unknown %s port %d", + direction == SPA_DIRECTION_INPUT ? "input" : "output", port_id); goto done; }