mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
audio-format: set unpossisioned flag
If we don't have position information in the format, set the unpositioned flag. Don't set position info in the format when the unpositioned flag is set.
This commit is contained in:
parent
aade499aae
commit
00a570f7de
2 changed files with 11 additions and 5 deletions
|
|
@ -354,9 +354,11 @@ static int port_enum_formats(struct spa_node *node,
|
|||
SPA_FORMAT_AUDIO_rate, &SPA_POD_Int(other->info.raw.rate),
|
||||
SPA_FORMAT_AUDIO_channels, &SPA_POD_Int(other->info.raw.channels),
|
||||
0);
|
||||
spa_pod_builder_prop(builder, SPA_FORMAT_AUDIO_position, 0);
|
||||
spa_pod_builder_array(builder, sizeof(uint32_t), SPA_TYPE_Id,
|
||||
info.info.raw.channels, info.info.raw.position);
|
||||
if (!SPA_FLAG_CHECK(other->info.raw.flags, SPA_AUDIO_FLAG_UNPOSITIONED)) {
|
||||
spa_pod_builder_prop(builder, SPA_FORMAT_AUDIO_position, 0);
|
||||
spa_pod_builder_array(builder, sizeof(uint32_t), SPA_TYPE_Id,
|
||||
info.info.raw.channels, info.info.raw.position);
|
||||
}
|
||||
*param = spa_pod_builder_pop(builder);
|
||||
} else {
|
||||
*param = spa_pod_builder_object(builder,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue