bu5hm4n pushed a commit to branch master.

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

commit bf146faf7289035eade9875735869de4da7622d4
Author: Marcel Hollerbach <[email protected]>
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 88c3b553c..e9f18bd7c 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);

-- 


Reply via email to