From 91de9e767bdac6922b709c5642214a49289a18b1 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Fri, 2 May 2003 13:57:22 +0000 Subject: close fd so disk don't get stuck on drive CVS patchset: 4750 CVS date: 2003/05/02 13:57:22 --- src/input/input_cdda.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c index 3e7e73763..c50ba8cd6 100644 --- a/src/input/input_cdda.c +++ b/src/input/input_cdda.c @@ -20,7 +20,7 @@ * Compact Disc Digital Audio (CDDA) Input Plugin * by Mike Melanson (melanson@pcisys.net) * - * $Id: input_cdda.c,v 1.15 2003/04/26 22:34:31 guenter Exp $ + * $Id: input_cdda.c,v 1.16 2003/05/02 13:57:22 miguelfreitas Exp $ */ #ifdef HAVE_CONFIG_H @@ -1253,6 +1253,7 @@ static int cdda_plugin_open (input_plugin_t *this_gen ) { if ((toc.first_track > (this->track + 1)) || (toc.last_track < (this->track + 1))) { + close(fd); free_cdrom_toc(&toc); return 0; } @@ -1351,6 +1352,7 @@ static char ** cdda_class_get_autoplay_list (input_class_t *this_gen, if (fd == -1) return NULL; read_cdrom_toc(fd, &toc); + close(fd); for( i = 0; i <= toc.last_track - toc.first_track; i++ ) { sprintf(trackmrl,"cdda:%d",i+toc.first_track); -- cgit v1.2.3