diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | include/xine.h.in | 3 | ||||
-rw-r--r-- | src/input/input_file.c | 9 | ||||
-rw-r--r-- | src/input/input_gnome_vfs.c | 9 |
4 files changed, 20 insertions, 3 deletions
@@ -27,6 +27,8 @@ xine-lib (1.0.2) * Fix LE_64/BE_64 macros on non-x86 plataforms. may fixes issues with some demuxers like avi, asf and ogg. * sputext improvements/workarounds + * add a new error message when a file we tried to play is an empty + (zero-sized) file xine-lib (1.0.1) * Big XvMC quality / correctness / cpu-usage fix. [bug #1114517] diff --git a/include/xine.h.in b/include/xine.h.in index ae0a37c66..691971f23 100644 --- a/include/xine.h.in +++ b/include/xine.h.in @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine.h.in,v 1.140 2005/04/21 21:50:42 dsalt Exp $ + * $Id: xine.h.in,v 1.141 2005/05/29 12:29:42 hadess Exp $ * * public xine-lib (libxine) interface and documentation * @@ -1751,6 +1751,7 @@ typedef struct { #define XINE_MSG_SECURITY 10 /* (security message) */ #define XINE_MSG_AUDIO_OUT_UNAVAILABLE 11 /* none */ #define XINE_MSG_PERMISSION_ERROR 12 /* (file name or mrl) */ +#define XINE_MSG_FILE_EMPTY 13 /* file is empty */ /* opaque xine_event_queue_t */ typedef struct xine_event_queue_s xine_event_queue_t; diff --git a/src/input/input_file.c b/src/input/input_file.c index fe5782af5..f3c4284f2 100644 --- a/src/input/input_file.c +++ b/src/input/input_file.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_file.c,v 1.100 2005/02/07 23:58:57 tmattern Exp $ + * $Id: input_file.c,v 1.101 2005/05/29 12:29:42 hadess Exp $ */ #ifdef HAVE_CONFIG_H @@ -290,6 +290,13 @@ static int file_plugin_open (input_plugin_t *this_gen ) { } } + if (file_plugin_get_length (this_gen) == 0) { + _x_message(this->stream, XINE_MSG_FILE_EMPTY, this->mrl, NULL); + xine_log (this->stream->xine, XINE_LOG_MSG, + _("input_file: File empty: >%s<\n"), this->mrl); + return 0; + } + return 1; } diff --git a/src/input/input_gnome_vfs.c b/src/input/input_gnome_vfs.c index 3ce0efa62..246e20023 100644 --- a/src/input/input_gnome_vfs.c +++ b/src/input/input_gnome_vfs.c @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_gnome_vfs.c,v 1.26 2005/05/13 14:33:09 hadess Exp $ + * $Id: input_gnome_vfs.c,v 1.27 2005/05/29 12:29:42 hadess Exp $ */ @@ -286,6 +286,13 @@ gnomevfs_plugin_open (input_plugin_t *this_gen ) return 0; } + if (gnomevfs_plugin_get_length (this_gen) == 0) { + _x_message(this->stream, XINE_MSG_FILE_EMPTY, this->mrl, NULL); + xine_log (this->stream->xine, XINE_LOG_MSG, + _("input_file: File empty: >%s<\n"), this->mrl); + return 0; + } + return 1; } |