From 4764d69e262c983004ba2cbc3848728f459b8aa9 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 5 Oct 2018 10:26:30 +0200 Subject: [PATCH] merger/splitter: only dynamic ports are dsp ports --- spa/plugins/audioconvert/merger.c | 5 +++++ spa/plugins/audioconvert/splitter.c | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/spa/plugins/audioconvert/merger.c b/spa/plugins/audioconvert/merger.c index 90bc4b8f0..3e3e8f876 100644 --- a/spa/plugins/audioconvert/merger.c +++ b/spa/plugins/audioconvert/merger.c @@ -54,6 +54,8 @@ struct port { struct spa_io_range *ctrl; struct spa_port_info info; + struct spa_dict info_props; + struct spa_dict_item info_props_items[2]; bool have_format; struct spa_audio_info format; @@ -223,6 +225,9 @@ static int impl_node_add_port(struct spa_node *node, enum spa_direction directio port->info.flags = SPA_PORT_INFO_FLAG_CAN_USE_BUFFERS | SPA_PORT_INFO_FLAG_REMOVABLE; + port->info_props_items[0] = SPA_DICT_ITEM_INIT("port.dsp", "32 bit float mono audio"); + port->info_props = SPA_DICT_INIT(port->info_props_items, 1); + port->info.props = &port->info_props; this->port_count++; if (this->last_port <= port_id) diff --git a/spa/plugins/audioconvert/splitter.c b/spa/plugins/audioconvert/splitter.c index 490b00b90..e290aa225 100644 --- a/spa/plugins/audioconvert/splitter.c +++ b/spa/plugins/audioconvert/splitter.c @@ -224,6 +224,11 @@ static int impl_node_add_port(struct spa_node *node, enum spa_direction directio port->info.flags = SPA_PORT_INFO_FLAG_CAN_USE_BUFFERS | SPA_PORT_INFO_FLAG_REMOVABLE; + + port->info_props_items[0] = SPA_DICT_ITEM_INIT("port.dsp", "32 bit float mono audio"); + port->info_props = SPA_DICT_INIT(port->info_props_items, 1); + port->info.props = &port->info_props; + spa_list_init(&port->queue); this->port_count++; @@ -294,10 +299,6 @@ impl_node_port_get_info(struct spa_node *node, port = GET_PORT(this, direction, port_id); - port->info_props_items[0] = SPA_DICT_ITEM_INIT("port.dsp", "32 bit float mono audio"); - port->info_props = SPA_DICT_INIT(port->info_props_items, 1); - port->info.props = &port->info_props; - *info = &port->info; return 0;