mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pulse-server: don't send invalid format and channels
This commit is contained in:
parent
0c66b5677b
commit
2cd59fdf8b
2 changed files with 27 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue