From fb81abce46e8b1779efbc19f0024886a23ae74d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Sat, 10 Apr 2004 13:20:16 +0000 Subject: Fix segfaults on errors. Because I added using standard xine network functions into cdda, we need also create stream in cdda_class_get_autoplay_list. It looks as hacky solution, but it's better than reimplementing network functions, IMHO. CVS patchset: 6376 CVS date: 2004/04/10 13:20:16 --- 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 c6792ddc2..f6fed63f2 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.46 2004/04/09 22:18:35 miguelfreitas Exp $ + * $Id: input_cdda.c,v 1.47 2004/04/10 13:20:16 valtri Exp $ */ #ifdef HAVE_CONFIG_H @@ -2221,10 +2221,12 @@ static char ** cdda_class_get_autoplay_list (input_class_t *this_gen, #ifndef WIN32 if( strchr(this->cdda_device,':') ) { + ip->stream = xine_stream_new(this->xine, NULL, NULL); fd = network_connect(ip->stream, this->cdda_device); if( fd != -1 ) { err = network_read_cdrom_toc(ip->stream, fd, toc); } + xine_dispose(ip->stream); } #endif -- cgit v1.2.3