[pulseaudio-commits] r2286 - /branches/glitch-free/src/pulsecore/sink.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Sun Apr 20 14:49:06 PDT 2008


Author: lennart
Date: Sun Apr 20 23:49:05 2008
New Revision: 2286

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2286&root=pulseaudio&view=rev
Log:
use the sink description instead of the name to choose the description for the monitor source

Modified:
    branches/glitch-free/src/pulsecore/sink.c

Modified: branches/glitch-free/src/pulsecore/sink.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/glitch-free/src/pulsecore/sink.c?rev=2286&root=pulseaudio&r1=2285&r2=2286&view=diff
==============================================================================
--- branches/glitch-free/src/pulsecore/sink.c (original)
+++ branches/glitch-free/src/pulsecore/sink.c Sun Apr 20 23:49:05 2008
@@ -124,10 +124,10 @@
         pa_sink_flags_t flags) {
 
     pa_sink *s;
-    char *d;
     const char *name;
     char st[PA_SAMPLE_SPEC_SNPRINT_MAX], cm[PA_CHANNEL_MAP_SNPRINT_MAX];
     pa_source_new_data source_data;
+    const char *dn;
 
     pa_assert(core);
     pa_assert(data);
@@ -235,9 +235,8 @@
     source_data.driver = data->driver;
     source_data.module = data->module;
 
-    d = pa_sprintf_malloc("Monitor Source of %s", s->name);
-    pa_proplist_sets(source_data.proplist, PA_PROP_DEVICE_DESCRIPTION, d);
-    pa_xfree(d);
+    dn = pa_proplist_gets(s->proplist, PA_PROP_DEVICE_DESCRIPTION);
+    pa_proplist_setf(source_data.proplist, PA_PROP_DEVICE_DESCRIPTION, "Monitor Source of %s", dn ? dn : s->name);
     pa_proplist_sets(source_data.proplist, PA_PROP_DEVICE_CLASS, "monitor");
 
     s->monitor_source = pa_source_new(core, &source_data, 0);




More information about the pulseaudio-commits mailing list