summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-07-31 23:18:16 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-07-31 23:18:16 +0000
commit9e3123d6a3f686998c6e83ceec33760efaa1e56f (patch)
treeafeebbb25b6d57ccddd5036c3e925440d6b4c697 /mplayer.c
parent5f8d90d83b69b6945f49cea655c374f430eb6179 (diff)
downloadmpv-9e3123d6a3f686998c6e83ceec33760efaa1e56f.tar.bz2
mpv-9e3123d6a3f686998c6e83ceec33760efaa1e56f.tar.xz
largefile patch by Stephen Davies <steve@daviesfam.org>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1429 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c33
1 files changed, 21 insertions, 12 deletions
diff --git a/mplayer.c b/mplayer.c
index 094dd36e4b..fcf8c3fc89 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -1,24 +1,25 @@
// AVI & MPEG Player v0.18 (C) 2000-2001. by A'rpi/ESP-team
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <signal.h>
+#include "version.h"
+#include "config.h"
#include <sys/ioctl.h>
-#include <unistd.h>
-#include <time.h>
#include <sys/mman.h>
-
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/time.h>
#include <sys/stat.h>
+
+#include <signal.h>
+
+#include <time.h>
+
#include <fcntl.h>
+#include <unistd.h>
-#include "version.h"
-#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#ifdef __FreeBSD__
#include <sys/cdrio.h>
@@ -227,7 +228,7 @@ extern void avi_fixate();
int osd_level=2;
int divx_quality=0;
char *seek_to_sec=NULL;
-int seek_to_byte=0;
+off_t seek_to_byte=0;
int has_audio=1;
char *audio_codec=NULL; // override audio codec
char *video_codec=NULL; // override video codec
@@ -641,7 +642,7 @@ if(vcd_track){
stream->end_pos=ret2;
} else {
//============ Open plain FILE ============
- int len;
+ off_t len;
if(!strcmp(filename,"-")){
// read from stdin
printf("Reading from stdin...\n");
@@ -656,6 +657,14 @@ if(vcd_track){
f=open(filename,O_RDONLY);
if(f<0){ fprintf(stderr,"File not found: '%s'\n",filename);return 1; }
len=lseek(f,0,SEEK_END); lseek(f,0,SEEK_SET);
+ if (len == -1)
+ perror("Error: lseek failed to obtain video file size");
+ else
+#ifdef _LARGEFILE_SOURCE
+ fprintf(stderr, "File size is %lld bytes\n", (long long)len);
+#else
+ fprintf(stderr, "File size is %u bytes\n", (unsigned int)len);
+#endif
stream=new_stream(f,STREAMTYPE_FILE);
stream->end_pos=len;
#ifdef STREAMING