From b8cbfe61d042d407e5d16957ef8b73397fba939f Mon Sep 17 00:00:00 2001 From: columbarius Date: Sun, 24 Sep 2023 15:00:08 +0200 Subject: [PATCH] videoconvert: get running --- spa/plugins/videoconvert/videoadapter.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/spa/plugins/videoconvert/videoadapter.c b/spa/plugins/videoconvert/videoadapter.c index 369ce9bc1..486d57a53 100644 --- a/spa/plugins/videoconvert/videoadapter.c +++ b/spa/plugins/videoconvert/videoadapter.c @@ -170,6 +170,8 @@ next: switch (id) { case SPA_PARAM_EnumPortConfig: + if (this->convert == NULL) + return 0; return convert_enum_port_config(this, seq, id, start, num, filter, &b.b); case SPA_PARAM_PortConfig: if (this->passthrough) { @@ -1727,8 +1729,14 @@ impl_init(const struct spa_handle_factory *factory, spa_node_add_listener(this->convert, &this->convert_listener, &convert_node_events, this); - // reconfigure_mode(this, true, this->direction, NULL); - configure_convert(this, SPA_PARAM_PORT_CONFIG_MODE_convert); + if (this->direction == SPA_DIRECTION_INPUT) { + // MODE: CONVERT + // configure_convert(this, SPA_PARAM_PORT_CONFIG_MODE_convert); + reconfigure_mode(this, true, this->direction, NULL); + } else { + // MODE: PASSTHROUGH + reconfigure_mode(this, true, this->direction, NULL); + } link_io(this);