mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
format: Make pa_format_info_snprint() more parseable
Removes the comma as the proplist separator since that makes pa_proplist_from_string() break and prints only the encoding if there are no properties (instead of "<encoding>, (no properties)").
This commit is contained in:
parent
248394c8bf
commit
348c51bfcd
1 changed files with 5 additions and 2 deletions
|
|
@ -114,8 +114,11 @@ char *pa_format_info_snprint(char *s, size_t l, const pa_format_info *f) {
|
|||
if (!pa_format_info_valid(f))
|
||||
pa_snprintf(s, l, _("(invalid)"));
|
||||
else {
|
||||
tmp = pa_proplist_to_string_sep(f->plist, ", ");
|
||||
pa_snprintf(s, l, _("%s, %s"), pa_encoding_to_string(f->encoding), tmp[0] ? tmp : _("(no properties)"));
|
||||
tmp = pa_proplist_to_string_sep(f->plist, " ");
|
||||
if (tmp[0])
|
||||
pa_snprintf(s, l, "%s, %s", pa_encoding_to_string(f->encoding), tmp);
|
||||
else
|
||||
pa_snprintf(s, l, "%s", pa_encoding_to_string(f->encoding));
|
||||
pa_xfree(tmp);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue