diff options
author | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2011-08-12 21:04:38 +0530 |
---|---|---|
committer | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2011-08-15 11:51:35 +0530 |
commit | 348c51bfcdfa58bc99e44329b3aa1067adc0e920 (patch) | |
tree | 14dc18daba1075a70359d38a6810705d5196a838 | |
parent | 248394c8bfdaea5b57e2e68df89bebb498b22601 (diff) | |
download | pulseaudio-panda-348c51bfcdfa58bc99e44329b3aa1067adc0e920.tar.gz pulseaudio-panda-348c51bfcdfa58bc99e44329b3aa1067adc0e920.tar.bz2 pulseaudio-panda-348c51bfcdfa58bc99e44329b3aa1067adc0e920.zip |
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)").
-rw-r--r-- | src/pulse/format.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/pulse/format.c b/src/pulse/format.c index 81c329ff..112b103c 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); } |