summaryrefslogtreecommitdiff
path: root/src/input/input_file.c
diff options
context:
space:
mode:
authorGuenter Bartsch <guenter@users.sourceforge.net>2002-03-16 20:53:49 +0000
committerGuenter Bartsch <guenter@users.sourceforge.net>2002-03-16 20:53:49 +0000
commite05ef252cdfedebc10470253b2605be3c6c6b2db (patch)
tree988dfc83c11f5a44c3616250d9141b395a578357 /src/input/input_file.c
parent6a02dd50918a2b6142354ced60c254c7d234ef3c (diff)
downloadxine-lib-e05ef252cdfedebc10470253b2605be3c6c6b2db.tar.gz
xine-lib-e05ef252cdfedebc10470253b2605be3c6c6b2db.tar.bz2
framerate and other fixes for demux_asf
CVS patchset: 1574 CVS date: 2002/03/16 20:53:49
Diffstat (limited to 'src/input/input_file.c')
-rw-r--r--src/input/input_file.c12
1 files changed, 9 insertions, 3 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