diff options
author | ben <benjaminfranzke@googlemail.com> | 2010-10-21 18:00:24 +0200 |
---|---|---|
committer | ben <benjaminfranzke@googlemail.com> | 2010-10-21 18:00:24 +0200 |
commit | 2c6e80e1741707fec58bb3e5c114079a9d7ccaa5 (patch) | |
tree | 154ab469f88468ad2524a8d2ea899407a7d8452e /src/pa-sink-ctl.c | |
parent | e931bee328da0586759a427dfe0a5410d32ddf28 (diff) | |
download | pa-sink-ctl-2c6e80e1741707fec58bb3e5c114079a9d7ccaa5.tar.gz pa-sink-ctl-2c6e80e1741707fec58bb3e5c114079a9d7ccaa5.tar.bz2 pa-sink-ctl-2c6e80e1741707fec58bb3e5c114079a9d7ccaa5.zip |
get_sink_input_info: use pa_sink_info name attr as fallback
Diffstat (limited to 'src/pa-sink-ctl.c')
-rw-r--r-- | src/pa-sink-ctl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pa-sink-ctl.c b/src/pa-sink-ctl.c index 04d4481..02a58ab 100644 --- a/src/pa-sink-ctl.c +++ b/src/pa-sink-ctl.c @@ -168,7 +168,9 @@ void get_sink_input_info_callback(pa_context *c, const pa_sink_input_info *i, gi g_array_append_val(g_array_index(sink_list_tmp, sink_info, i->sink).input_list, ((sink_input_info) { .index = i->index, .sink = i->sink, - .name = g_strdup(pa_proplist_gets(i->proplist, "application.name")), + .name = pa_proplist_contains(i->proplist, "application.name") ? + g_strdup(pa_proplist_gets(i->proplist, "application.name")): + g_strdup(i->name), .mute = i->mute, .channels = i->volume.channels, .vol = pa_cvolume_avg(&i->volume), |