aboutsummaryrefslogtreecommitdiffstats
path: root/src/output
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/output/jack_plugin.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/output/jack_plugin.c b/src/output/jack_plugin.c
index d3a718cd1..14bf81b2c 100644
--- a/src/output/jack_plugin.c
+++ b/src/output/jack_plugin.c
@@ -35,7 +35,7 @@ struct jack_data {
/* configuration */
char *name;
- const char *output_ports[2];
+ char *output_ports[2];
int ringbuffer_size;
/* for srate() only */
@@ -299,8 +299,9 @@ mpd_jack_connect(struct jack_data *jd, struct audio_format *audio_format)
if (!jd->output_ports[1] &&
(jports = jack_get_ports(jd->client, NULL, NULL,
JackPortIsPhysical | JackPortIsInput))) {
- jd->output_ports[0] = jports[0];
- jd->output_ports[1] = jports[1] ? jports[1] : jports[0];
+ jd->output_ports[0] = g_strdup(jports[0]);
+ jd->output_ports[1] = g_strdup(jports[1] != NULL
+ ? jports[1] : jports[0]);
g_debug("output_ports: %s %s",
jd->output_ports[0], jd->output_ports[1]);
free(jports);