diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-07-31 23:18:16 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-07-31 23:18:16 +0000 |
commit | 9e3123d6a3f686998c6e83ceec33760efaa1e56f (patch) | |
tree | afeebbb25b6d57ccddd5036c3e925440d6b4c697 /stream.h | |
parent | 5f8d90d83b69b6945f49cea655c374f430eb6179 (diff) | |
download | mpv-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 'stream.h')
-rw-r--r-- | stream.h | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -20,16 +20,17 @@ void vcd_cache_init(int s); typedef struct { int fd; - long pos; + off_t pos; int eof; int type; // 0=file 1=VCD unsigned int buf_pos,buf_len; - long start_pos,end_pos; + off_t start_pos,end_pos; unsigned char buffer[STREAM_BUFFER_SIZE>VCD_SECTOR_SIZE?STREAM_BUFFER_SIZE:VCD_SECTOR_SIZE]; } stream_t; int stream_fill_buffer(stream_t *s); -int stream_seek_long(stream_t *s,unsigned int pos); + +int stream_seek_long(stream_t *s,off_t pos); inline static int stream_read_char(stream_t *s){ return (s->buf_pos<s->buf_len)?s->buffer[s->buf_pos++]: @@ -91,16 +92,16 @@ inline static int stream_eof(stream_t *s){ return s->eof; } -inline static int stream_tell(stream_t *s){ +inline static off_t stream_tell(stream_t *s){ return s->pos+s->buf_pos-s->buf_len; } -inline static int stream_seek(stream_t *s,unsigned int pos){ +inline static int stream_seek(stream_t *s,off_t pos){ -// if(verbose>=3) printf("seek to 0x%X\n",pos); +// if(verbose>=3) printf("seek to 0x%qX\n",(long long)pos); if(pos<s->pos){ - int x=pos-(s->pos-s->buf_len); + off_t x=pos-(s->pos-s->buf_len); if(x>=0){ s->buf_pos=x; // putchar('*');fflush(stdout); |