mirror of
http://mpg123.de/trunk/.git
synced 2025-10-25 04:37:34 +03:00
Fix an alsa (not just there, I guess) crash by making sure the ao->userptr and ao->fn get cleared after close in close_output.
Also removed direct uses of ao->close in mpg123.c and buffer.c . git-svn-id: svn://scm.orgis.org/mpg123/trunk@1044 35dc7657-300d-0410-a2e5-dc2837fedb53
This commit is contained in:
15
src/buffer.c
15
src/buffer.c
@@ -141,15 +141,12 @@ void buffer_loop(audio_output_t *ao, sigset_t *oldsigset)
|
||||
*/
|
||||
if (xf->wakeme[XF_WRITER])
|
||||
xfermem_putcmd(my_fd, XF_CMD_WAKEUP);
|
||||
if (param.outmode == DECODE_AUDIO) {
|
||||
ao->close(ao);
|
||||
ao->rate = xf->buf[0];
|
||||
ao->channels = xf->buf[1];
|
||||
ao->format = xf->buf[2];
|
||||
if (ao->open(ao) < 0) {
|
||||
perror("audio");
|
||||
exit(1);
|
||||
}
|
||||
ao->rate = xf->buf[0];
|
||||
ao->channels = xf->buf[1];
|
||||
ao->format = xf->buf[2];
|
||||
if (reset_output(ao) < 0) {
|
||||
error1("failed to reset audio: %s", strerror(errno));
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
if ( (bytes = xfermem_get_usedspace(xf)) < outburst ) {
|
||||
|
||||
Reference in New Issue
Block a user