diff options
Diffstat (limited to '')
-rw-r--r-- | src/mixer/pulse_mixer.c | 12 | ||||
-rw-r--r-- | src/output/pulse_plugin.c | 10 |
2 files changed, 10 insertions, 12 deletions
diff --git a/src/mixer/pulse_mixer.c b/src/mixer/pulse_mixer.c index 883a7ffd8..0a83755f7 100644 --- a/src/mixer/pulse_mixer.c +++ b/src/mixer/pulse_mixer.c @@ -31,9 +31,9 @@ struct pulse_mixer { struct mixer base; - char *server; - char *sink; - char *output_name; + const char *server; + const char *sink; + const char *output_name; uint32_t index; bool online; struct pa_context *context; @@ -170,9 +170,9 @@ pulse_mixer_init(const struct config_param *param) pm->volume = g_new(struct pa_cvolume,1); - pm->server = config_dup_block_string(param, "server", NULL); - pm->sink = config_dup_block_string(param, "sink", NULL); - pm->output_name = config_dup_block_string(param, "name", NULL); + pm->server = config_get_block_string(param, "server", NULL); + pm->sink = config_get_block_string(param, "sink", NULL); + pm->output_name = config_get_block_string(param, "name", NULL); return &pm->base; } diff --git a/src/output/pulse_plugin.c b/src/output/pulse_plugin.c index fdab02599..ffc7abc8b 100644 --- a/src/output/pulse_plugin.c +++ b/src/output/pulse_plugin.c @@ -28,10 +28,10 @@ struct pulse_data { const char *name; + const char *server; + const char *sink; pa_simple *s; - char *server; - char *sink; }; /** @@ -57,8 +57,6 @@ static struct pulse_data *pulse_new_data(void) static void pulse_free_data(struct pulse_data *pd) { - g_free(pd->server); - g_free(pd->sink); g_free(pd); } @@ -70,8 +68,8 @@ pulse_init(G_GNUC_UNUSED const struct audio_format *audio_format, pd = pulse_new_data(); pd->name = config_get_block_string(param, "name", "mpd_pulse"); - pd->server = config_dup_block_string(param, "server", NULL); - pd->sink = config_dup_block_string(param, "sink", NULL); + pd->server = config_get_block_string(param, "server", NULL); + pd->sink = config_get_block_string(param, "sink", NULL); return pd; } |