Mercurial > mplayer.hg
changeset 15641:1bb5111490cd
Create a unique client name so that multiple instances work.
Patch by Jason Tackaberry (tack sault org)
author | reimar |
---|---|
date | Sun, 05 Jun 2005 08:37:48 +0000 |
parents | f585d2bcdc6b |
children | d48f3ae96eff |
files | libao2/ao_jack.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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 <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;