Mercurial > mplayer.hg
diff stream/stream.c @ 35881:b5abdfe9bc61
Replace some uses of off_t by uint64_t.
This allows code that does not rely on lseek etc. to work
even on systems that do not support 64 bit off_t yet.
Signed-off-by: Reimar Dffinger <Reimar.Doeffinger@gmx.de>
author | reimar |
---|---|
date | Sat, 16 Mar 2013 10:09:12 +0000 |
parents | b89534df8e1e |
children | 3389262720da |
line wrap: on
line diff
--- a/stream/stream.c Sat Mar 16 09:20:51 2013 +0000 +++ b/stream/stream.c Sat Mar 16 10:09:12 2013 +0000 @@ -286,7 +286,7 @@ #define MAX_RECONNECT_RETRIES 5 #define RECONNECT_SLEEP_MS 1000 int retry = 0; - off_t pos = s->pos; + uint64_t pos = s->pos; // Seeking is used as a hack to make network streams // reopen the connection, ideally they would implement // e.g. a STREAM_CTRL_RECONNECT to do this @@ -380,7 +380,7 @@ return rd; } -int stream_seek_internal(stream_t *s, off_t newpos) +int stream_seek_internal(stream_t *s, uint64_t newpos) { if(newpos==0 || newpos!=s->pos){ switch(s->type){ @@ -428,9 +428,9 @@ return -1; } -int stream_seek_long(stream_t *s,off_t pos){ +int stream_seek_long(stream_t *s, uint64_t pos){ int res; -off_t newpos=0; + uint64_t newpos=0; // if( mp_msg_test(MSGT_STREAM,MSGL_DBG3) ) printf("seek_long to 0x%X\n",(unsigned int)pos); @@ -445,7 +445,7 @@ if(s->sector_size) newpos = (pos/s->sector_size)*s->sector_size; else - newpos = pos&(~((off_t)STREAM_BUFFER_SIZE-1)); + newpos = pos&(~((uint64_t)STREAM_BUFFER_SIZE-1)); if( mp_msg_test(MSGT_STREAM,MSGL_DBG3) ){ mp_msg(MSGT_STREAM,MSGL_DBG3, "s->pos=%"PRIX64" newpos=%"PRIX64" new_bufpos=%"PRIX64" buflen=%X \n",