mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
pulse-server: increase channel name length
, and AUX11 and the \0 need at least 8 chars, 6 chars will truncate after AUX1 and leave an invalid channel map.
This commit is contained in:
parent
c1a0a602a5
commit
2905635de3
7 changed files with 14 additions and 14 deletions
|
|
@ -160,9 +160,9 @@ static void position_to_props(struct spa_audio_info_raw *info, struct pw_propert
|
|||
uint32_t i;
|
||||
|
||||
pw_properties_setf(props, SPA_KEY_AUDIO_CHANNELS, "%u", info->channels);
|
||||
p = s = alloca(info->channels * 6);
|
||||
p = s = alloca(info->channels * 8);
|
||||
for (i = 0; i < info->channels; i++)
|
||||
p += snprintf(p, 6, "%s%s", i == 0 ? "" : ",",
|
||||
p += snprintf(p, 8, "%s%s", i == 0 ? "" : ",",
|
||||
channel_id2name(info->position[i]));
|
||||
pw_properties_set(props, SPA_KEY_AUDIO_POSITION, s);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -160,9 +160,9 @@ static void position_to_props(struct spa_audio_info_raw *info, struct pw_propert
|
|||
uint32_t i;
|
||||
|
||||
pw_properties_setf(props, SPA_KEY_AUDIO_CHANNELS, "%u", info->channels);
|
||||
p = s = alloca(info->channels * 6);
|
||||
p = s = alloca(info->channels * 8);
|
||||
for (i = 0; i < info->channels; i++)
|
||||
p += snprintf(p, 6, "%s%s", i == 0 ? "" : ",",
|
||||
p += snprintf(p, 8, "%s%s", i == 0 ? "" : ",",
|
||||
channel_id2name(info->position[i]));
|
||||
pw_properties_set(props, SPA_KEY_AUDIO_POSITION, s);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -177,9 +177,9 @@ struct module *create_module_null_sink(struct impl *impl, const char *argument)
|
|||
|
||||
pw_properties_setf(props, SPA_KEY_AUDIO_CHANNELS, "%u", info.channels);
|
||||
|
||||
p = s = alloca(info.channels * 6);
|
||||
p = s = alloca(info.channels * 8);
|
||||
for (i = 0; i < info.channels; i++)
|
||||
p += snprintf(p, 6, "%s%s", i == 0 ? "" : ",",
|
||||
p += snprintf(p, 8, "%s%s", i == 0 ? "" : ",",
|
||||
channel_id2name(info.position[i]));
|
||||
pw_properties_set(props, SPA_KEY_AUDIO_POSITION, s);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,9 +139,9 @@ static void position_to_props(struct spa_audio_info_raw *info, struct pw_propert
|
|||
uint32_t i;
|
||||
|
||||
pw_properties_setf(props, SPA_KEY_AUDIO_CHANNELS, "%u", info->channels);
|
||||
p = s = alloca(info->channels * 6);
|
||||
p = s = alloca(info->channels * 8);
|
||||
for (i = 0; i < info->channels; i++)
|
||||
p += snprintf(p, 6, "%s%s", i == 0 ? "" : ",",
|
||||
p += snprintf(p, 8, "%s%s", i == 0 ? "" : ",",
|
||||
channel_id2name(info->position[i]));
|
||||
pw_properties_set(props, SPA_KEY_AUDIO_POSITION, s);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,9 +139,9 @@ static void position_to_props(struct spa_audio_info_raw *info, struct pw_propert
|
|||
uint32_t i;
|
||||
|
||||
pw_properties_setf(props, SPA_KEY_AUDIO_CHANNELS, "%u", info->channels);
|
||||
p = s = alloca(info->channels * 6);
|
||||
p = s = alloca(info->channels * 8);
|
||||
for (i = 0; i < info->channels; i++)
|
||||
p += snprintf(p, 6, "%s%s", i == 0 ? "" : ",",
|
||||
p += snprintf(p, 8, "%s%s", i == 0 ? "" : ",",
|
||||
channel_id2name(info->position[i]));
|
||||
pw_properties_set(props, SPA_KEY_AUDIO_POSITION, s);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -144,9 +144,9 @@ static void audio_info_to_props(struct spa_audio_info_raw *info, struct pw_prope
|
|||
uint32_t i;
|
||||
|
||||
pw_properties_setf(props, SPA_KEY_AUDIO_CHANNELS, "%u", info->channels);
|
||||
p = s = alloca(info->channels * 6);
|
||||
p = s = alloca(info->channels * 8);
|
||||
for (i = 0; i < info->channels; i++)
|
||||
p += snprintf(p, 6, "%s%s", i == 0 ? "" : ",",
|
||||
p += snprintf(p, 8, "%s%s", i == 0 ? "" : ",",
|
||||
channel_id2name(info->position[i]));
|
||||
pw_properties_set(props, SPA_KEY_AUDIO_POSITION, s);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -144,9 +144,9 @@ static void audio_info_to_props(struct spa_audio_info_raw *info, struct pw_prope
|
|||
uint32_t i;
|
||||
|
||||
pw_properties_setf(props, SPA_KEY_AUDIO_CHANNELS, "%u", info->channels);
|
||||
p = s = alloca(info->channels * 6);
|
||||
p = s = alloca(info->channels * 8);
|
||||
for (i = 0; i < info->channels; i++)
|
||||
p += snprintf(p, 6, "%s%s", i == 0 ? "" : ",",
|
||||
p += snprintf(p, 8, "%s%s", i == 0 ? "" : ",",
|
||||
channel_id2name(info->position[i]));
|
||||
pw_properties_set(props, SPA_KEY_AUDIO_POSITION, s);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue