summaryrefslogtreecommitdiffstats
path: root/libao2
diff options
context:
space:
mode:
Diffstat (limited to 'libao2')
-rw-r--r--libao2/ao_jack.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libao2/ao_jack.c b/libao2/ao_jack.c
index 5e86c290e7..a386f09665 100644
--- a/libao2/ao_jack.c
+++ b/libao2/ao_jack.c
@@ -11,6 +11,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include "config.h"
#include "mp_msg.h"
@@ -209,6 +210,7 @@ static void print_help ()
static int init(int rate, int channels, int format, int flags) {
const char **matching_ports = NULL;
char *port_name = NULL;
+ char client_name[40];
opt_t subopts[] = {
{"port", OPT_ARG_MSTRZ, &port_name, NULL},
{NULL}
@@ -223,7 +225,8 @@ static int init(int rate, int channels, int format, int flags) {
mp_msg(MSGT_AO, MSGL_FATAL, "[JACK] Invalid number of channels: %i\n", channels);
goto err_out;
}
- client = jack_client_new("MPlayer");
+ sprintf(client_name, "MPlayer [%d]", getpid());
+ client = jack_client_new(client_name);
if (!client) {
mp_msg(MSGT_AO, MSGL_FATAL, "[JACK] cannot open server\n");
goto err_out;