pulse-server: handle unsupported formats

We can only handle PCM encodings for now, fail conversion otherwise.
If we have no supported formats, return an error code.

VLC first try to send AC3 or EAC3 passthrough and then tries again
with decoded data. If we accept the encoded data we are just playing
noise.

Fixes #428
This commit is contained in:
Wim Taymans 2021-02-19 15:25:32 +01:00
parent 4b591df145
commit fcf00b3d35
2 changed files with 51 additions and 8 deletions

View file

@ -563,6 +563,9 @@ static const struct spa_pod *format_info_build_param(struct spa_pod_builder *b,
spa_zero(ss);
spa_zero(map);
if (info->encoding != ENCODING_PCM)
return NULL;
if ((str = pw_properties_get(info->props, "format.sample_format")) == NULL)
return NULL;