mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
spa: avoid using SPA_AUDIO_MAX_CHANNELS
Use SPA_N_ELEMENTS instead of the array we try to handle.
This commit is contained in:
parent
818d1435ce
commit
dbc5c81e4a
7 changed files with 22 additions and 16 deletions
|
|
@ -2046,7 +2046,7 @@ static int do_auto_port_config(struct impl *this, const char *str)
|
|||
return -ENOENT;
|
||||
|
||||
if (format.media_subtype == SPA_MEDIA_SUBTYPE_raw) {
|
||||
uint32_t n_pos = SPA_MIN(SPA_AUDIO_MAX_CHANNELS, format.info.raw.channels);
|
||||
uint32_t n_pos = SPA_MIN(SPA_N_ELEMENTS(format.info.raw.position), format.info.raw.channels);
|
||||
if (position == POSITION_AUX) {
|
||||
for (i = 0; i < n_pos; i++)
|
||||
format.info.raw.position[i] = SPA_AUDIO_CHANNEL_START_Aux + i;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue