[MPlayer-cvslog] CVS: main/libao2 ao_jack.c,1.10,1.11
Reimar Döffinger CVS
syncmail at mplayerhq.hu
Sun Jun 5 10:37:51 CEST 2005
CVS change done by Reimar Döffinger CVS
Update of /cvsroot/mplayer/main/libao2
In directory mail:/var2/tmp/cvs-serv17705
Modified Files:
ao_jack.c
Log Message:
Create a unique client name so that multiple instances work.
Patch by Jason Tackaberry (tack sault org)
Index: ao_jack.c
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/ao_jack.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- ao_jack.c 3 Jun 2005 20:35:07 -0000 1.10
+++ ao_jack.c 5 Jun 2005 08:37:48 -0000 1.11
@@ -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 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 @@
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;
More information about the MPlayer-cvslog
mailing list