# HG changeset patch # User reimar # Date 1117960668 0 # Node ID 1bb5111490cd19b6bede1106066fbe048f62677b # Parent f585d2bcdc6bd0527d09325bf5895b816e738d20 Create a unique client name so that multiple instances work. Patch by Jason Tackaberry (tack sault org) diff -r f585d2bcdc6b -r 1bb5111490cd libao2/ao_jack.c --- a/libao2/ao_jack.c Sat Jun 04 21:42:53 2005 +0000 +++ b/libao2/ao_jack.c Sun Jun 05 08:37:48 2005 +0000 @@ -11,6 +11,7 @@ #include #include #include +#include #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;