mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
spa: don't add more channels than we have positions
This commit is contained in:
parent
f453b1545d
commit
ede13a8cb5
1 changed files with 2 additions and 1 deletions
|
|
@ -69,7 +69,8 @@ spa_format_audio_raw_build(struct spa_pod_builder *builder, uint32_t id,
|
||||||
if (!SPA_FLAG_IS_SET(info->flags, SPA_AUDIO_FLAG_UNPOSITIONED)) {
|
if (!SPA_FLAG_IS_SET(info->flags, SPA_AUDIO_FLAG_UNPOSITIONED)) {
|
||||||
spa_pod_builder_add(builder, SPA_FORMAT_AUDIO_position,
|
spa_pod_builder_add(builder, SPA_FORMAT_AUDIO_position,
|
||||||
SPA_POD_Array(sizeof(uint32_t), SPA_TYPE_Id,
|
SPA_POD_Array(sizeof(uint32_t), SPA_TYPE_Id,
|
||||||
info->channels, info->position), 0);
|
SPA_MIN(info->channels, SPA_N_ELEMENTS(info->position)),
|
||||||
|
info->position), 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (struct spa_pod*)spa_pod_builder_pop(builder, &f);
|
return (struct spa_pod*)spa_pod_builder_pop(builder, &f);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue