diff options
author | František Dvořák <valtri@users.sourceforge.net> | 2004-05-02 15:17:39 +0000 |
---|---|---|
committer | František Dvořák <valtri@users.sourceforge.net> | 2004-05-02 15:17:39 +0000 |
commit | d67de10fc236de2f3a67ae6c237756c7deca14de (patch) | |
tree | 243fdddb638c7a9a475f5d16b8f051a16fe8efd7 | |
parent | 56f67198d0d28f9192da341d863342e4d8be0445 (diff) | |
download | xine-lib-d67de10fc236de2f3a67ae6c237756c7deca14de.tar.gz xine-lib-d67de10fc236de2f3a67ae6c237756c7deca14de.tar.bz2 |
Fix the crash with CDDB queries when server is off-line. Thanks for patch to Dario Nicodemi.
CVS patchset: 6473
CVS date: 2004/05/02 15:17:39
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | src/input/input_cdda.c | 4 |
2 files changed, 4 insertions, 2 deletions
@@ -1,3 +1,5 @@ + * fix possible crash in CDDB queries + xine-lib (1-rc4) * experimental DTS software decoder using libdts * SPU decoder: timestamp handling for NAV packets fixes the menu on the first diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c index 135748ab3..1ad33179a 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.51 2004/04/21 16:43:18 komadori Exp $ + * $Id: input_cdda.c,v 1.52 2004/05/02 15:17:39 valtri Exp $ */ #ifdef HAVE_CONFIG_H @@ -1453,7 +1453,7 @@ static int _cdda_cddb_socket_open(cdda_input_plugin_t *this) { fflush(stdout); #endif sock = _x_io_tcp_connect(this->stream, this->cddb.server, this->cddb.port); - if (_x_io_tcp_connect_finish(this->stream, sock, CDDB_TIMEOUT) != XIO_READY) { + if (sock == -1 || _x_io_tcp_connect_finish(this->stream, sock, CDDB_TIMEOUT) != XIO_READY) { xine_log(this->stream->xine, XINE_LOG_MSG, _("%s: can't connect to %s:%d\n"), LOG_MODULE, this->cddb.server, this->cddb.port); lprintf("failed\n"); return -1; |