summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-08-14 17:34:03 +0200
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-08-14 17:35:36 +0200
commitbf146faf7289035eade9875735869de4da7622d4 (patch)
treefb5e92640d3226d56328a9ae7d03ef9c12923ac1
parentb2c5c20cde89e22797db95b59590a9ecacdbb33b (diff)
downloadenlightenment-bf146faf7289035eade9875735869de4da7622d4.tar.gz
mixer: find a better name
if pa does not provide the name via the proplist we can just use the information from name if the name exists
-rw-r--r--src/modules/mixer/lib/backends/pulseaudio/pulse.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/modules/mixer/lib/backends/pulseaudio/pulse.c b/src/modules/mixer/lib/backends/pulseaudio/pulse.c
index 88c3b553c7..e9f18bd7cc 100644
--- a/src/modules/mixer/lib/backends/pulseaudio/pulse.c
+++ b/src/modules/mixer/lib/backends/pulseaudio/pulse.c
@@ -334,9 +334,17 @@ _sink_input_cb(pa_context *c EINA_UNUSED, const pa_sink_input_info *info,
Eina_Strbuf *input_name;
input_name = eina_strbuf_new();
- eina_strbuf_append(input_name, pa_proplist_gets(info->proplist, PA_PROP_APPLICATION_NAME));
- eina_strbuf_append(input_name, ":");
- eina_strbuf_append(input_name, info->name);
+ const char *application = pa_proplist_gets(info->proplist, PA_PROP_APPLICATION_NAME);
+ if (application)
+ {
+ eina_strbuf_append(input_name, application);
+ eina_strbuf_append(input_name, ":");
+ eina_strbuf_append(input_name, info->name);
+ }
+ else if (info->name)
+ {
+ eina_strbuf_append(input_name, info->name);
+ }
input->base.name = eina_stringshare_add(eina_strbuf_string_get(input_name));
eina_strbuf_free(input_name);
input->base.volume = _pa_cvolume_convert(&info->volume);