pulse-server: don't send invalid format and channels

This commit is contained in:
Wim Taymans 2020-11-24 10:18:17 +01:00
parent 0c66b5677b
commit 2cd59fdf8b
2 changed files with 27 additions and 0 deletions

View file

@ -37,6 +37,13 @@ struct volume {
.values[1] = 1.0f, \
}
static inline bool volume_valid(const struct volume *vol)
{
if (vol->channels == 0 || vol->channels > CHANNELS_MAX)
return false;
return true;
}
struct volume_info {
struct volume volume;
struct channel_map map;