aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/pulse_plugin.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/output/pulse_plugin.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/output/pulse_plugin.c b/src/output/pulse_plugin.c
index 7d746378c..45710b4a9 100644
--- a/src/output/pulse_plugin.c
+++ b/src/output/pulse_plugin.c
@@ -57,19 +57,14 @@ pulse_init(struct audio_output *ao,
G_GNUC_UNUSED const struct audio_format *audio_format,
struct config_param *param)
{
- struct block_param *server = NULL;
- struct block_param *sink = NULL;
struct pulse_data *pd;
- if (param) {
- server = getBlockParam(param, "server");
- sink = getBlockParam(param, "sink");
- }
-
pd = pulse_new_data();
pd->ao = ao;
- pd->server = server != NULL ? g_strdup(server->value) : NULL;
- pd->sink = sink != NULL ? g_strdup(sink->value) : NULL;
+ pd->server = param != NULL
+ ? config_dup_block_string(param, "server", NULL) : NULL;
+ pd->sink = param != NULL
+ ? config_dup_block_string(param, "sink", NULL) : NULL;
return pd;
}