From 22ec01d5c071b1012aa9f926f38e950bb10ee3fe Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 21 Feb 2022 15:04:16 +0100 Subject: [PATCH] pulse-server: improve fix_ flags handling PulseAudio will convert the samplespec/channelmap to a format_info and omits the input format/rate/channels when the fix flags are set. It does not use the input values at all. Do the same in pipewire-pulse, make a single format description without the requested fields. This also needs a session manager fix to make it deal with those missing fields. See #876 --- src/modules/module-protocol-pulse/pulse-server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/module-protocol-pulse/pulse-server.c b/src/modules/module-protocol-pulse/pulse-server.c index c2134ecf3..e4e77faad 100644 --- a/src/modules/module-protocol-pulse/pulse-server.c +++ b/src/modules/module-protocol-pulse/pulse-server.c @@ -1563,7 +1563,7 @@ static int do_create_playback_stream(struct client *client, uint32_t command, ui n_valid_formats++; } } - if (n_params < MAX_FORMATS && + else if (n_params < MAX_FORMATS && (params[n_params] = format_build_param(&b, SPA_PARAM_EnumFormat, &ss, ss.channels > 0 ? &map : NULL)) != NULL) {