spa: avoid using SPA_AUDIO_MAX_CHANNELS

Use SPA_N_ELEMENTS instead of the array we try to handle.
This commit is contained in:
Wim Taymans 2025-10-21 16:05:33 +02:00
parent 818d1435ce
commit dbc5c81e4a
7 changed files with 22 additions and 16 deletions

View file

@ -450,7 +450,7 @@ void channel_map_parse(const char *str, struct channel_map *map)
void channel_map_parse_position(const char *str, struct channel_map *map)
{
uint32_t channels = 0, position[SPA_AUDIO_MAX_CHANNELS];
uint32_t channels = 0, position[CHANNELS_MAX];
spa_audio_parse_position_n(str, strlen(str), position,
SPA_N_ELEMENTS(position), &channels);
positions_to_channel_map(position, channels, map);