[pulseaudio-discuss] [PATCH] allow-passthrough: Change the name of null-sink

Jungsup Lee jungsup4.lee at samsung.com
Wed Apr 19 02:36:33 UTC 2017


Sink's "media.name" property is mostly NULL, therefore
using sink's name instead of sink's "media.name" property.
---
 src/modules/module-allow-passthrough.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/modules/module-allow-passthrough.c b/src/modules/module-allow-passthrough.c
index 31ff270..856c6c6 100644
--- a/src/modules/module-allow-passthrough.c
+++ b/src/modules/module-allow-passthrough.c
@@ -59,7 +59,6 @@ static pa_sink *ensure_null_sink_for_sink(struct userdata *u, pa_sink *s, pa_cor
     pa_module *m;
     pa_sink *sink;
     uint32_t idx;
-    const char *name;
 
     sink = pa_hashmap_get(u->null_sinks, s);
     if (sink != NULL) {
@@ -67,10 +66,8 @@ static pa_sink *ensure_null_sink_for_sink(struct userdata *u, pa_sink *s, pa_cor
         return sink;
     }
 
-    name = pa_proplist_gets(s->proplist, PA_PROP_MEDIA_NAME);
-
     t = pa_sprintf_malloc("sink_name=allow_passthrough_null_%s sink_properties='device.description=\"%s\"'",
-                          name ? name : "", _("Dummy Output"));
+                          s->name, _("Dummy Output"));
     m = pa_module_load(c, "module-null-sink", t);
     pa_xfree(t);
 
-- 
2.6.4



More information about the pulseaudio-discuss mailing list