discomfitor pushed a commit to branch enlightenment-0.21.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=e32fab8b8eaff1874f3a30f6007338f67add400e

commit e32fab8b8eaff1874f3a30f6007338f67add400e
Author: Marcel Hollerbach <marcel-hollerb...@t-online.de>
Date:   Mon Aug 14 17:34:03 2017 +0200

    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
---
 src/modules/mixer/lib/backends/pulseaudio/pulse.c | 14 +++++++++++---
 1 file 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 3c9c96338..19c599555 100644
--- a/src/modules/mixer/lib/backends/pulseaudio/pulse.c
+++ b/src/modules/mixer/lib/backends/pulseaudio/pulse.c
@@ -333,9 +333,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);

-- 


Reply via email to