summaryrefslogtreecommitdiffstats
path: root/libao2
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-06-05 08:37:48 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-06-05 08:37:48 +0000
commite28660bc1d76981ee37585f410d9a097cf6b5621 (patch)
treeb31a1e7fa9cd1f2d220fe058caa5ef1419a737bc /libao2
parentf03da6e7e926518866a957528b26643405cb19d4 (diff)
downloadmpv-e28660bc1d76981ee37585f410d9a097cf6b5621.tar.bz2
mpv-e28660bc1d76981ee37585f410d9a097cf6b5621.tar.xz
Create a unique client name so that multiple instances work.
Patch by Jason Tackaberry (tack sault org) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15642 b3059339-0415-0410-9bf9-f77b7e298cf2
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;