diff options
author | František Dvořák <valtri@users.sourceforge.net> | 2004-04-10 13:20:16 +0000 |
---|---|---|
committer | František Dvořák <valtri@users.sourceforge.net> | 2004-04-10 13:20:16 +0000 |
commit | fb81abce46e8b1779efbc19f0024886a23ae74d1 (patch) | |
tree | 9b796c1eb13b3994cf104ab01b31817a59cbf8bf /src | |
parent | 1ed6b113452e2ef1c93e8ff6aa47d04dd486bc53 (diff) | |
download | xine-lib-fb81abce46e8b1779efbc19f0024886a23ae74d1.tar.gz xine-lib-fb81abce46e8b1779efbc19f0024886a23ae74d1.tar.bz2 |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/input/input_cdda.c | 4 |
1 files changed, 3 insertions, 1 deletions
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 |