jack plugin closes stdin if jack is unavailable
PATCH 1/1 jack plugin closes stdin if jack is unavailable
Hi,
the jack plugin closes stdin if the pcm interfaces is opened but jack isn't running. Initializing the file descriptors to -1 fixes the problem.
/Mikael
pcm_jack.c 11 Apr 2006 22:02:15 -0000 renamed from pcm_jack.c 21 Mar 2006 11:51:23 -0000 1.2 +7 -2
@@ -61,8 +61,10 @@ free(jack->port_names[i]); free(jack->port_names); } - close(jack->fd); - close(jack->io.poll_fd); + if (jack->fd >= 0) + close(jack->fd); + if (jack->io.poll_fd >= 0) + close(jack->io.poll_fd); free(jack->areas); free(jack); }
@@ -321,6 +323,9 @@ if (!jack) return -ENOMEM; + jack->fd = -1; + jack->io.poll_fd = -1; + err = parse_ports(jack, stream == SND_PCM_STREAM_PLAYBACK ? playback_conf : capture_conf); if (err) {
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
Takashi Iwai
AppliedAt Wed, 12 Apr 2006 00:07:08 +0200,
Quoted 5 lines · Mikael Magnusson
Hi,
the jack plugin closes stdin if the pcm interfaces is opened but jack isn't running. Initializing the file descriptors to -1 fixes the problem.
Thanks, applied to CVS.
Takashi
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642