algorithms: make sure channels is always less or equal to SPA_AUDIO_MAX_CHANNELS

Needed when using audiotestsrc with an adapter
This commit is contained in:
Julian Bouzas 2020-04-27 13:06:53 -04:00 committed by George Kiagiadakis
parent 63482108df
commit 19c91596c8

View file

@ -330,6 +330,7 @@ select_channels (WpSpaPod *value)
i++;
}
ret = SPA_MAX (vals[1], vals[2]);
ret = SPA_MIN (ret, SPA_AUDIO_MAX_CHANNELS);
}
return ret;