From 348c51bfcdfa58bc99e44329b3aa1067adc0e920 Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Fri, 12 Aug 2011 21:04:38 +0530 Subject: [PATCH] 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 ", (no properties)"). --- src/pulse/format.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pulse/format.c b/src/pulse/format.c index 81c329ff0..112b103c8 100644 --- a/src/pulse/format.c +++ b/src/pulse/format.c @@ -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); }