From c2c833c068a38ab2d5bea1cd9515cda8ad93b28d Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 20 Apr 2008 21:49:05 +0000 Subject: [PATCH] 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 --- src/pulsecore/sink.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c index 39468f1..34fb7ae 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); -- 2.7.4