From: Gildas Bazin Date: Mon, 24 Mar 2003 17:15:30 +0000 (+0000) Subject: * modules/access/*: pf_read() in access modules is now blocking. We still X-Git-Tag: 0.5.3~101 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=607b74b2a18121c12033f59027f9ab2fa5201235;p=vlc * modules/access/*: pf_read() in access modules is now blocking. We still check regularly for p_input->b_die though. Now the demuxers can safely assume that pf_read() == 0 means EOF. * ALL: got rid of the p_input->b_connected flag. * src/input/input_ext-plugins.c, src/input/input.c: fixed the infinite loop of "decoder stuck" messages that sometimes happened. * src/interface/intf_eject.c, modules/misc/network/ipv4.c: fixed compilation warnings. --- diff --git a/include/input_ext-intf.h b/include/input_ext-intf.h index 99e37b93c4..fa6acdbd1b 100644 --- a/include/input_ext-intf.h +++ b/include/input_ext-intf.h @@ -4,7 +4,7 @@ * control the pace of reading. ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: input_ext-intf.h,v 1.86 2003/03/09 23:39:05 jlj Exp $ + * $Id: input_ext-intf.h,v 1.87 2003/03/24 17:15:29 gbazin Exp $ * * Authors: Christophe Massiot * @@ -222,7 +222,6 @@ struct stream_descriptor_t disc or network */ vlc_bool_t b_pace_control; /* can we read when we want ? */ vlc_bool_t b_seekable; /* can we do lseek() ? */ - vlc_bool_t b_connected; /* does read() == 0 imply EOF ? */ /* if (b_seekable) : */ unsigned int i_area_nb; diff --git a/modules/access/directory.c b/modules/access/directory.c index de33727c11..ce08002bac 100644 --- a/modules/access/directory.c +++ b/modules/access/directory.c @@ -2,7 +2,7 @@ * directory.c: expands a directory (directory: access plug-in) ***************************************************************************** * Copyright (C) 2001, 2002 VideoLAN - * $Id: directory.c,v 1.2 2003/03/24 01:39:58 gbazin Exp $ + * $Id: directory.c,v 1.3 2003/03/24 17:15:29 gbazin Exp $ * * Authors: Derk-Jan Hartman * @@ -238,7 +238,6 @@ static ssize_t Read( input_thread_t * p_input, byte_t * p_buffer, size_t i_len ) p_access_data->i_buf_pos += i_ret; return (ssize_t) i_ret; } - - p_input->stream.b_connected = VLC_TRUE; + return 0; } diff --git a/modules/access/dvd/access.c b/modules/access/dvd/access.c index 0ce1fae5fa..ffeba628d8 100644 --- a/modules/access/dvd/access.c +++ b/modules/access/dvd/access.c @@ -8,7 +8,7 @@ * -udf.* to find files ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: access.c,v 1.11 2003/03/11 23:56:53 gbazin Exp $ + * $Id: access.c,v 1.12 2003/03/24 17:15:29 gbazin Exp $ * * Author: Stéphane Borel * @@ -191,7 +191,6 @@ int E_(DVDOpen) ( vlc_object_t *p_this ) p_input->stream.i_method = INPUT_METHOD_DVD; p_input->stream.b_pace_control = 1; p_input->stream.b_seekable = 1; - p_input->stream.b_connected = 1; p_input->stream.p_selected_area->i_size = 0; p_input->stream.p_selected_area->i_tell = 0; diff --git a/modules/access/dvdplay/access.c b/modules/access/dvdplay/access.c index f0787d7050..6fe3685a9e 100644 --- a/modules/access/dvdplay/access.c +++ b/modules/access/dvdplay/access.c @@ -2,7 +2,7 @@ * access.c: access capabilities for dvdplay plugin. ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: access.c,v 1.14 2003/03/24 14:18:28 hartman Exp $ + * $Id: access.c,v 1.15 2003/03/24 17:15:29 gbazin Exp $ * * Author: Stéphane Borel * @@ -130,7 +130,6 @@ int E_(OpenDVD) ( vlc_object_t *p_this ) p_input->stream.b_pace_control = 1; /* seek is only allowed when we have size info */ p_input->stream.b_seekable = 0; - p_input->stream.b_connected = 1; /* Initialize ES structures */ input_InitStream( p_input, sizeof( stream_ps_data_t ) ); diff --git a/modules/access/dvdread/input.c b/modules/access/dvdread/input.c index e8cf171911..eb52382314 100644 --- a/modules/access/dvdread/input.c +++ b/modules/access/dvdread/input.c @@ -6,7 +6,7 @@ * It depends on: libdvdread for ifo files and block reading. ***************************************************************************** * Copyright (C) 2001, 2003 VideoLAN - * $Id: input.c,v 1.18 2003/03/24 14:18:28 hartman Exp $ + * $Id: input.c,v 1.19 2003/03/24 17:15:29 gbazin Exp $ * * Author: Stéphane Borel * @@ -364,7 +364,6 @@ int E_(OpenDVD) ( vlc_object_t *p_this ) /* If we are here we can control the pace... */ p_input->stream.b_pace_control = VLC_TRUE; p_input->stream.b_seekable = VLC_TRUE; - p_input->stream.b_connected = VLC_TRUE; p_input->stream.p_selected_area->i_size = 0; p_input->stream.p_selected_area->i_tell = 0; diff --git a/modules/access/file.c b/modules/access/file.c index e75048d38e..98553b64a8 100644 --- a/modules/access/file.c +++ b/modules/access/file.c @@ -2,7 +2,7 @@ * file.c: file input (file: access plug-in) ***************************************************************************** * Copyright (C) 2001, 2002 VideoLAN - * $Id: file.c,v 1.13 2003/03/04 21:12:04 gbazin Exp $ + * $Id: file.c,v 1.14 2003/03/24 17:15:29 gbazin Exp $ * * Authors: Christophe Massiot * @@ -130,7 +130,6 @@ static int Open( vlc_object_t *p_this ) vlc_mutex_lock( &p_input->stream.stream_lock ); - p_input->stream.b_connected = 1; if( *p_input->psz_access && !strncmp( p_input->psz_access, "stream", 7 ) ) { /* stream:%s */ diff --git a/modules/access/ftp.c b/modules/access/ftp.c index f16d958933..8d77c52b29 100644 --- a/modules/access/ftp.c +++ b/modules/access/ftp.c @@ -2,7 +2,7 @@ * ftp.c: ***************************************************************************** * Copyright (C) 2001, 2002 VideoLAN - * $Id: ftp.c,v 1.9 2003/03/03 14:21:08 gbazin Exp $ + * $Id: ftp.c,v 1.10 2003/03/24 17:15:29 gbazin Exp $ * * Authors: Laurent Aimar * @@ -374,7 +374,6 @@ static int Open( vlc_object_t *p_this ) p_input->stream.b_pace_control = 1; p_input->stream.p_selected_area->i_tell = 0; p_input->stream.b_seekable = 1; - p_input->stream.b_connected = 1; p_input->stream.p_selected_area->i_size = p_access->i_filesize; p_input->stream.i_method = INPUT_METHOD_NETWORK; vlc_mutex_unlock( &p_input->stream.stream_lock ); @@ -817,6 +816,7 @@ static ssize_t NetRead( input_thread_t *p_input, #else struct timeval timeout; fd_set fds; + ssize_t i_recv; int i_ret; /* Initialize file descriptor set */ @@ -828,26 +828,30 @@ static ssize_t NetRead( input_thread_t *p_input, timeout.tv_usec = 1000000; /* Find if some data is available */ - i_ret = select( p_socket->i_handle + 1, &fds, - NULL, NULL, &timeout ); + while( (i_ret = select( p_socket->i_handle + 1, &fds, + NULL, NULL, &timeout )) == 0 + || (i_ret < 0 && errno == EINTR) ) + { + if( p_input->b_die || p_input->b_error ) + { + return 0; + } + } - if( i_ret == -1 && errno != EINTR ) + if( i_ret < 0 ) { msg_Err( p_input, "network select error (%s)", strerror(errno) ); + return -1; } - else if( i_ret > 0 ) - { - ssize_t i_recv = recv( p_socket->i_handle, p_buffer, i_len, 0 ); - if( i_recv < 0 ) - { - msg_Err( p_input, "recv failed (%s)", strerror(errno) ); - } + i_recv = recv( p_socket->i_handle, p_buffer, i_len, 0 ); - return i_recv; + if( i_recv < 0 ) + { + msg_Err( p_input, "recv failed (%s)", strerror(errno) ); } - return 0; + return i_recv; #endif } diff --git a/modules/access/http.c b/modules/access/http.c index 9c83c6a480..1494a54c8f 100644 --- a/modules/access/http.c +++ b/modules/access/http.c @@ -2,7 +2,7 @@ * http.c: HTTP access plug-in ***************************************************************************** * Copyright (C) 2001, 2002 VideoLAN - * $Id: http.c,v 1.27 2003/03/22 23:03:02 sigmunau Exp $ + * $Id: http.c,v 1.28 2003/03/24 17:15:29 gbazin Exp $ * * Authors: Christophe Massiot * @@ -611,7 +611,6 @@ static int Open( vlc_object_t *p_this ) vlc_mutex_lock( &p_input->stream.stream_lock ); p_input->stream.b_pace_control = VLC_TRUE; p_input->stream.b_seekable = VLC_TRUE; - p_input->stream.b_connected = VLC_TRUE; p_input->stream.p_selected_area->i_tell = 0; p_input->stream.p_selected_area->i_size = 0; p_input->stream.i_method = INPUT_METHOD_NETWORK; @@ -700,6 +699,7 @@ static ssize_t Read( input_thread_t * p_input, byte_t * p_buffer, size_t i_len ) input_socket_t * p_access_data = (input_socket_t *)p_input->p_access_data; struct timeval timeout; fd_set fds; + ssize_t i_recv; int i_ret; /* Initialize file descriptor set */ @@ -711,35 +711,35 @@ static ssize_t Read( input_thread_t * p_input, byte_t * p_buffer, size_t i_len ) timeout.tv_usec = 500000; /* Find if some data is available */ - i_ret = select( p_access_data->i_handle + 1, &fds, - NULL, NULL, &timeout ); - + while( (i_ret = select( p_access_data->i_handle + 1, &fds, + NULL, NULL, &timeout )) == 0 #ifdef HAVE_ERRNO_H - if( i_ret == -1 && errno != EINTR ) + || (i_ret < 0 && errno == EINTR) +#endif + ) { - msg_Err( p_input, "network select error (%s)", strerror(errno) ); + if( p_input->b_die || p_input->b_error ) + { + return 0; + } } -#else - if( i_ret == -1 ) + + if( i_ret < 0 ) { msg_Err( p_input, "network select error" ); + return -1; } -#endif - else if( i_ret > 0 ) - { - ssize_t i_recv = recv( p_access_data->i_handle, p_buffer, i_len, 0 ); - if( i_recv < 0 ) - { + i_recv = recv( p_access_data->i_handle, p_buffer, i_len, 0 ); + + if( i_recv < 0 ) + { #ifdef HAVE_ERRNO_H - msg_Err( p_input, "recv failed (%s)", strerror(errno) ); + msg_Err( p_input, "recv failed (%s)", strerror(errno) ); #else - msg_Err( p_input, "recv failed" ); + msg_Err( p_input, "recv failed" ); #endif - } - - return i_recv; } - return 0; + return i_recv; } diff --git a/modules/access/mms/mms.c b/modules/access/mms/mms.c index da5e2f347e..bfaeb16a58 100644 --- a/modules/access/mms/mms.c +++ b/modules/access/mms/mms.c @@ -2,7 +2,7 @@ * mms.c: MMS access plug-in ***************************************************************************** * Copyright (C) 2001, 2002 VideoLAN - * $Id: mms.c,v 1.27 2003/03/16 01:49:28 fenrir Exp $ + * $Id: mms.c,v 1.28 2003/03/24 17:15:29 gbazin Exp $ * * Authors: Laurent Aimar * @@ -252,14 +252,6 @@ static int Open( vlc_object_t *p_this ) /* *** finished to set some variable *** */ vlc_mutex_lock( &p_input->stream.stream_lock ); p_input->stream.b_pace_control = 0; - if( p_access->i_proto == MMS_PROTO_UDP ) - { - p_input->stream.b_connected = 0; - } - else - { - p_input->stream.b_connected = 1; - } p_input->stream.p_selected_area->i_tell = 0; /* * i_flags_broadcast @@ -1477,11 +1469,17 @@ static int NetFillBuffer( input_thread_t *p_input ) timeout.tv_usec = 500000; /* Find if some data is available */ - i_ret = select( i_handle_max + 1, - &fds, - NULL, NULL, &timeout ); + while( (i_ret = select( i_handle_max + 1, &fds, + NULL, NULL, &timeout )) == 0 + || (i_ret < 0 && errno == EINTR) ) + { + if( p_input->b_die || p_input->b_error ) + { + return 0; + } + } - if( i_ret == -1 && errno != EINTR ) + if( i_ret < 0 ) { msg_Err( p_input, "network select error (%s)", strerror(errno) ); return -1; diff --git a/modules/access/satellite/access.c b/modules/access/satellite/access.c index 252f3a0b4a..e4a9269ddd 100644 --- a/modules/access/satellite/access.c +++ b/modules/access/satellite/access.c @@ -287,7 +287,6 @@ int E_(Open) ( vlc_object_t *p_this ) p_input->stream.b_pace_control = 1; p_input->stream.b_seekable = 0; - p_input->stream.b_connected = 0; p_input->stream.p_selected_area->i_tell = 0; vlc_mutex_unlock( &p_input->stream.stream_lock ); diff --git a/modules/access/slp.c b/modules/access/slp.c index 45cc05cb3f..8fb92dbae2 100644 --- a/modules/access/slp.c +++ b/modules/access/slp.c @@ -2,7 +2,7 @@ * slp.c: SLP access plugin ***************************************************************************** * Copyright (C) 2001, 2002 VideoLAN - * $Id: slp.c,v 1.8 2003/02/20 01:52:45 sigmunau Exp $ + * $Id: slp.c,v 1.9 2003/03/24 17:15:29 gbazin Exp $ * * Authors: Loïc Minier * @@ -340,7 +340,6 @@ static int Open( vlc_object_t * p_this ) vlc_mutex_lock( &p_input->stream.stream_lock ); p_input->stream.b_pace_control = VLC_FALSE; p_input->stream.b_seekable = VLC_FALSE; - p_input->stream.b_connected = VLC_TRUE; p_input->stream.p_selected_area->i_tell = 0; p_input->stream.p_selected_area->i_size = 0; p_input->stream.i_method = INPUT_METHOD_SLP; diff --git a/modules/access/udp.c b/modules/access/udp.c index b84c69dd27..6957eed6ee 100644 --- a/modules/access/udp.c +++ b/modules/access/udp.c @@ -2,7 +2,7 @@ * udp.c: raw UDP & RTP access plug-in ***************************************************************************** * Copyright (C) 2001, 2002 VideoLAN - * $Id: udp.c,v 1.15 2003/03/03 14:21:08 gbazin Exp $ + * $Id: udp.c,v 1.16 2003/03/24 17:15:29 gbazin Exp $ * * Authors: Christophe Massiot * Tristan Leteurtre @@ -235,7 +235,6 @@ static int Open( vlc_object_t *p_this ) vlc_mutex_lock( &p_input->stream.stream_lock ); p_input->stream.b_pace_control = 0; p_input->stream.b_seekable = 0; - p_input->stream.b_connected = 0; p_input->stream.p_selected_area->i_tell = 0; p_input->stream.i_method = INPUT_METHOD_NETWORK; vlc_mutex_unlock( &p_input->stream.stream_lock ); @@ -324,6 +323,7 @@ static ssize_t Read( input_thread_t * p_input, byte_t * p_buffer, size_t i_len ) input_socket_t * p_access_data = (input_socket_t *)p_input->p_access_data; struct timeval timeout; fd_set fds; + ssize_t i_recv; int i_ret; /* Initialize file descriptor set */ @@ -335,38 +335,42 @@ static ssize_t Read( input_thread_t * p_input, byte_t * p_buffer, size_t i_len ) timeout.tv_usec = 500000; /* Find if some data is available */ - i_ret = select( p_access_data->i_handle + 1, &fds, - NULL, NULL, &timeout ); + while( (i_ret = select( p_access_data->i_handle + 1, &fds, + NULL, NULL, &timeout )) == 0 + || (i_ret < 0 && errno == EINTR) ) + { + if( p_input->b_die || p_input->b_error ) + { + return 0; + } + } - if( i_ret == -1 && errno != EINTR ) + if( i_ret < 0 ) { msg_Err( p_input, "network select error (%s)", strerror(errno) ); + return -1; } - else if( i_ret > 0 ) - { - ssize_t i_recv = recv( p_access_data->i_handle, p_buffer, i_len, 0 ); - if( i_recv < 0 ) - { + i_recv = recv( p_access_data->i_handle, p_buffer, i_len, 0 ); + + if( i_recv < 0 ) + { #ifdef WIN32 - /* On win32 recv() will fail if the datagram doesn't fit inside - * the passed buffer, even though the buffer will be filled with - * the first part of the datagram. */ - if( WSAGetLastError() == WSAEMSGSIZE ) - { - msg_Err( p_input, "recv() failed. " - "Increase the mtu size (--mtu option)" ); - i_recv = i_len; - } - else + /* On win32 recv() will fail if the datagram doesn't fit inside + * the passed buffer, even though the buffer will be filled with + * the first part of the datagram. */ + if( WSAGetLastError() == WSAEMSGSIZE ) + { + msg_Err( p_input, "recv() failed. " + "Increase the mtu size (--mtu option)" ); + i_recv = i_len; + } + else #endif - msg_Err( p_input, "recv failed (%s)", strerror(errno) ); - } - - return i_recv; + msg_Err( p_input, "recv failed (%s)", strerror(errno) ); } - return 0; + return i_recv; #endif } diff --git a/modules/access/v4l/v4l.c b/modules/access/v4l/v4l.c index d02bd2b95a..0a1d203e0b 100644 --- a/modules/access/v4l/v4l.c +++ b/modules/access/v4l/v4l.c @@ -2,7 +2,7 @@ * v4l.c : Video4Linux input module for vlc ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: v4l.c,v 1.2 2002/12/31 01:54:36 massiot Exp $ + * $Id: v4l.c,v 1.3 2003/03/24 17:15:30 gbazin Exp $ * * Author: Samuel Hocevar * @@ -64,7 +64,6 @@ static int V4lOpen( vlc_object_t *p_this ) vlc_mutex_lock( &p_input->stream.stream_lock ); p_input->stream.b_pace_control = 0; p_input->stream.b_seekable = 0; - p_input->stream.b_connected = 0; p_input->stream.p_selected_area->i_size = 0; p_input->stream.p_selected_area->i_tell = 0; p_input->stream.i_method = INPUT_METHOD_FILE; diff --git a/modules/access/vcd/vcd.c b/modules/access/vcd/vcd.c index 14e84ed2cd..3a7257adbb 100644 --- a/modules/access/vcd/vcd.c +++ b/modules/access/vcd/vcd.c @@ -2,7 +2,7 @@ * vcd.c : VCD input module for vlc ***************************************************************************** * Copyright (C) 2000 VideoLAN - * $Id: vcd.c,v 1.16 2003/03/11 23:56:54 gbazin Exp $ + * $Id: vcd.c,v 1.17 2003/03/24 17:15:30 gbazin Exp $ * * Author: Johan Bilien * @@ -171,7 +171,6 @@ static int VCDOpen( vlc_object_t *p_this ) p_input->stream.b_pace_control = 1; p_input->stream.b_seekable = 1; - p_input->stream.b_connected = 1; p_input->stream.p_selected_area->i_size = 0; p_input->stream.p_selected_area->i_tell = 0; diff --git a/modules/misc/network/ipv4.c b/modules/misc/network/ipv4.c index 3501ffbb58..ec0e589316 100644 --- a/modules/misc/network/ipv4.c +++ b/modules/misc/network/ipv4.c @@ -2,7 +2,7 @@ * ipv4.c: IPv4 network abstraction layer ***************************************************************************** * Copyright (C) 2001, 2002 VideoLAN - * $Id: ipv4.c,v 1.16 2003/03/11 13:52:25 titer Exp $ + * $Id: ipv4.c,v 1.17 2003/03/24 17:15:30 gbazin Exp $ * * Authors: Christophe Massiot * Mathias Kretschmer @@ -384,7 +384,7 @@ static int OpenUDP( vlc_object_t * p_this, network_socket_t * p_socket ) ttl = 1; if( setsockopt( i_handle, IPPROTO_IP, IP_MULTICAST_TTL, - &ttl, sizeof( ttl ) ) < 0 ) + (void *) &ttl, sizeof( ttl ) ) < 0 ) { #ifdef HAVE_ERRNO_H msg_Warn( p_this, "failed to set ttl (%s)", diff --git a/src/input/input.c b/src/input/input.c index 8060c5928e..55cf7c01f6 100644 --- a/src/input/input.c +++ b/src/input/input.c @@ -4,7 +4,7 @@ * decoders. ***************************************************************************** * Copyright (C) 1998-2002 VideoLAN - * $Id: input.c,v 1.225 2003/03/14 00:24:08 sigmunau Exp $ + * $Id: input.c,v 1.226 2003/03/24 17:15:30 gbazin Exp $ * * Authors: Christophe Massiot * @@ -341,7 +341,7 @@ static int RunThread( input_thread_t *p_input ) /* Read and demultiplex some data. */ i_count = p_input->pf_demux( p_input ); - if( i_count == 0 && p_input->stream.b_connected ) + if( i_count == 0 ) { /* End of file - we do not set b_die because only the * playlist is allowed to do so. */ diff --git a/src/input/input_ext-plugins.c b/src/input/input_ext-plugins.c index 14b6f4eca1..2802c14ac0 100644 --- a/src/input/input_ext-plugins.c +++ b/src/input/input_ext-plugins.c @@ -2,7 +2,7 @@ * input_ext-plugins.c: useful functions for access and demux plug-ins ***************************************************************************** * Copyright (C) 2001, 2002 VideoLAN - * $Id: input_ext-plugins.c,v 1.30 2003/03/05 17:55:13 gbazin Exp $ + * $Id: input_ext-plugins.c,v 1.31 2003/03/24 17:15:30 gbazin Exp $ * * Authors: Christophe Massiot * @@ -517,6 +517,12 @@ ssize_t input_FillBuffer( input_thread_t * p_input ) (byte_t *)p_buf + sizeof(data_buffer_t) + i_remains, p_input->i_bufsize ); + if( i_ret < 0 && i_remains == 0 ) + { + /* Our internal buffers are empty, we can signal the error */ + return -1; + } + if( i_ret < 0 ) i_ret = 0; p_input->p_data_buffer = p_buf; @@ -538,7 +544,7 @@ ssize_t input_Peek( input_thread_t * p_input, byte_t ** pp_byte, size_t i_size ) /* Go to the next buffer */ ssize_t i_ret = input_FillBuffer( p_input ); - if( i_ret == -1 ) + if( i_ret < 0 ) { return -1; } @@ -564,7 +570,7 @@ ssize_t input_SplitBuffer( input_thread_t * p_input, /* Go to the next buffer */ ssize_t i_ret = input_FillBuffer( p_input ); - if( i_ret == -1 ) + if( i_ret < 0 ) { return -1; } diff --git a/src/interface/intf_eject.c b/src/interface/intf_eject.c index 58a45d92f7..36e0f5e131 100644 --- a/src/interface/intf_eject.c +++ b/src/interface/intf_eject.c @@ -2,7 +2,7 @@ * intf_eject.c: CD/DVD-ROM ejection handling functions ***************************************************************************** * Copyright (C) 2001, 2002 VideoLAN - * $Id: intf_eject.c,v 1.19 2003/03/21 17:14:56 gbazin Exp $ + * $Id: intf_eject.c,v 1.20 2003/03/24 17:15:30 gbazin Exp $ * * Author: Julien Blache for the Linux part * with code taken from the Linux "eject" command @@ -157,11 +157,13 @@ int __intf_Eject( vlc_object_t *p_this, const char *psz_device ) { st.dwItem = MCI_STATUS_READY; /* Eject disc */ - mciSendCommand( op.wDeviceID, MCI_SET, MCI_SET_DOOR_OPEN, 0 ); + i_ret = mciSendCommand( op.wDeviceID, MCI_SET, MCI_SET_DOOR_OPEN, 0 ); /* Release access to the device */ mciSendCommand( op.wDeviceID, MCI_CLOSE, MCI_WAIT, 0 ); } + else i_ret = VLC_EGENERIC; + return i_ret; #else /* WIN32 */ int i_fd;