mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-15 07:00:05 -05:00
audio: don't use SPA_AUDIO_MAX_CHANNELS in some places
When we know the max size of the array, just use this instead of the SPA_AUDIO_MAX_CHANNELS constant.
This commit is contained in:
parent
c94aff8cae
commit
f453b1545d
14 changed files with 22 additions and 18 deletions
|
|
@ -334,9 +334,12 @@ static void rtp_opus_deinit(struct impl *impl, enum spa_direction direction)
|
|||
static int rtp_opus_init(struct impl *impl, enum spa_direction direction)
|
||||
{
|
||||
int err;
|
||||
unsigned char mapping[SPA_AUDIO_MAX_CHANNELS];
|
||||
unsigned char mapping[255];
|
||||
uint32_t i;
|
||||
|
||||
if (impl->info.info.opus.channels > 255)
|
||||
return -EINVAL;
|
||||
|
||||
if (impl->psamples >= 2880)
|
||||
impl->psamples = 2880;
|
||||
else if (impl->psamples >= 1920)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue