From 0814bafef1d2f4ae3670b95df971a0c9192b0922 Mon Sep 17 00:00:00 2001 From: Michael Tretter Date: Mon, 27 Jan 2025 17:33:47 +0100 Subject: [PATCH] videoadapter: fix EnumPortConfig for adapter without converter The videoadapter always exposes the EnumPortConfig parameter. If no converter is loaded, the EnumPortConfig parameter doesn't return a parameter. In this case, the client-node in the PipeWire server returns -ENOENT for the EnumPortConfig, which in turn causes WirePlumber to fail the object activation and it won't be able to create a link for the object. This happens since Commit b57375ba85e9 ("stream: enable videoadapter in all cases"), since now the videoadapter is always added. Before that, the EnumPortConfig parameter was just not exposed and linking worked. Running another client that ignores the error codes for missing parameters (e.g., pw-dump) hides the issue, as the EnumPortConfig result is cached as successful with 0 parameters and accessing the cache doesn't return an error code. Return the same PortConfig for EnumPortConfig as for PortConfig to fix this. --- spa/plugins/videoconvert/videoadapter.c | 1 - 1 file changed, 1 deletion(-) diff --git a/spa/plugins/videoconvert/videoadapter.c b/spa/plugins/videoconvert/videoadapter.c index 65aee736b..8c1c8de77 100644 --- a/spa/plugins/videoconvert/videoadapter.c +++ b/spa/plugins/videoconvert/videoadapter.c @@ -187,7 +187,6 @@ next: switch (id) { case SPA_PARAM_EnumPortConfig: - return convert_enum_port_config(this, seq, id, start, num, filter, &b.b); case SPA_PARAM_PortConfig: if (this->passthrough) { switch (result.index) {