From afd6e578a8478ff23f6be3c79b0e9d90111ef455 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 11 Jul 2019 11:15:47 +0200 Subject: [PATCH] audioadapter: we don't need to clear the dynamic flag --- spa/plugins/audioconvert/audioadapter.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/spa/plugins/audioconvert/audioadapter.c b/spa/plugins/audioconvert/audioadapter.c index dfcbcbe9d..4a9a86ddb 100644 --- a/spa/plugins/audioconvert/audioadapter.c +++ b/spa/plugins/audioconvert/audioadapter.c @@ -283,20 +283,18 @@ static void convert_port_info(void *data, const struct spa_port_info *info) { struct impl *this = data; - bool monitor; - monitor = (info->props && - spa_dict_lookup(info->props, SPA_KEY_PORT_MONITOR) != NULL); - if (monitor) - port_id -= 1; - - spa_log_debug(this->log, NAME" %p: port info %d", this, port_id); - - if (direction == this->direction || monitor) { - struct spa_port_info i = *info; - SPA_FLAG_UNSET(i.flags, SPA_PORT_FLAG_DYNAMIC_DATA); - spa_node_emit_port_info(&this->hooks, direction, port_id, &i); + if (direction != this->direction) { + if (port_id == 0) + return; + else + port_id--; } + + spa_log_debug(this->log, NAME" %p: port info %d:%d", this, + direction, port_id); + + spa_node_emit_port_info(&this->hooks, direction, port_id, info); } static void convert_result(void *data, int seq, int res, uint32_t type, const void *result)