summaryrefslogtreecommitdiff
path: root/src/input
diff options
context:
space:
mode:
Diffstat (limited to 'src/input')
-rw-r--r--src/input/input_file.c12
-rw-r--r--src/input/input_plugin.h7
2 files changed, 13 insertions, 6 deletions
diff --git a/src/input/input_file.c b/src/input/input_file.c
index 08d1e8839..71de6bdb8 100644
--- a/src/input/input_file.c
+++ b/src/input/input_file.c
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2000 the xine project
+ * Copyright (C) 2000-2002 the xine project
*
- * This file is part of xine, a unix video player.
+ * This file is part of xine, a free video player.
*
* xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -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.39 2002/02/17 17:32:50 guenter Exp $
+ * $Id: input_file.c,v 1.40 2002/03/16 20:53:50 guenter Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -379,6 +379,9 @@ static off_t file_plugin_seek (input_plugin_t *this_gen, off_t offset, int origi
static off_t file_plugin_get_current_pos (input_plugin_t *this_gen){
file_input_plugin_t *this = (file_input_plugin_t *) this_gen;
+ if (this->fh <0)
+ return 0;
+
return lseek (this->fh, 0, SEEK_CUR);
}
@@ -390,6 +393,9 @@ static off_t file_plugin_get_length (input_plugin_t *this_gen) {
struct stat buf ;
file_input_plugin_t *this = (file_input_plugin_t *) this_gen;
+ if (this->fh <0)
+ return 0;
+
if (fstat (this->fh, &buf) == 0) {
return buf.st_size;
} else
diff --git a/src/input/input_plugin.h b/src/input/input_plugin.h
index b35490ca5..7406b87e3 100644
--- a/src/input/input_plugin.h
+++ b/src/input/input_plugin.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2000, 2001 the xine project
+ * Copyright (C) 2000-2002 the xine project
*
- * This file is part of xine, a unix video player.
+ * This file is part of xine, a free video player.
*
* xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -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_plugin.h,v 1.20 2001/12/09 23:09:32 guenter Exp $
+ * $Id: input_plugin.h,v 1.21 2002/03/16 20:53:50 guenter Exp $
*/
#ifndef HAVE_INPUT_PLUGIN_H
@@ -299,6 +299,7 @@ struct input_plugin_s
#define INPUT_OPTIONAL_DATA_TEXTSPU0 4
#define INPUT_OPTIONAL_DATA_TEXTSPU1 5
#define INPUT_OPTIONAL_DATA_TEXTSPU2 6
+#define INPUT_OPTIONAL_DATA_PREVIEW 7
/*
* each input plugin _must_ implement this function: