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
This commit is contained in:
Wim Taymans 2022-02-21 15:04:16 +01:00
parent c0727e1efc
commit 22ec01d5c0

View file

@ -1563,7 +1563,7 @@ static int do_create_playback_stream(struct client *client, uint32_t command, ui
n_valid_formats++; n_valid_formats++;
} }
} }
if (n_params < MAX_FORMATS && else if (n_params < MAX_FORMATS &&
(params[n_params] = format_build_param(&b, (params[n_params] = format_build_param(&b,
SPA_PARAM_EnumFormat, &ss, SPA_PARAM_EnumFormat, &ss,
ss.channels > 0 ? &map : NULL)) != NULL) { ss.channels > 0 ? &map : NULL)) != NULL) {