summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-04-20 21:49:05 +0000
committerLennart Poettering <lennart@poettering.net>2008-04-20 21:49:05 +0000
commitc2c833c068a38ab2d5bea1cd9515cda8ad93b28d (patch)
tree7e8b01024220a7c5b7820a8e2462b6b84feee31a
parent64e048cb1b170636e72b6a15afa3b6b8b90bb366 (diff)
use the sink description instead of the name to choose the description for the monitor source
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2286 fefdeb5f-60dc-0310-8127-8f9354f1896f
-rw-r--r--src/pulsecore/sink.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index 39468f1e..34fb7ae9 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -124,10 +124,10 @@ pa_sink* pa_sink_new(
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 @@ pa_sink* pa_sink_new(
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);