summaryrefslogtreecommitdiffstats
path: root/stream/stream.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-11-18 20:46:12 +0100
committerwm4 <wm4@nowhere>2012-11-20 18:00:15 +0100
commitddffcce67810fbde5508a353f85760da7a1b4a95 (patch)
tree74d9b416568c12759a0c198651bce0e78a0c2284 /stream/stream.c
parent51dac4e0702e361b88e5a373fbb0165f5ad47420 (diff)
downloadmpv-ddffcce67810fbde5508a353f85760da7a1b4a95.tar.bz2
mpv-ddffcce67810fbde5508a353f85760da7a1b4a95.tar.xz
stream, demux: replace off_t with int64_t
On reasonable systems, these types were the same anyway. Even on unreasonable systems (seriously, which?), this may reduce potential breakage.
Diffstat (limited to 'stream/stream.c')
-rw-r--r--stream/stream.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/stream/stream.c b/stream/stream.c
index d1dcc11dc0..a94939ffda 100644
--- a/stream/stream.c
+++ b/stream/stream.c
@@ -268,7 +268,7 @@ static int stream_reconnect(stream_t *s)
#define MAX_RECONNECT_RETRIES 5
#define RECONNECT_SLEEP_MS 1000
int retry = 0;
- off_t pos = s->pos;
+ int64_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
@@ -356,7 +356,7 @@ int stream_write_buffer(stream_t *s, unsigned char *buf, int len) {
return rd;
}
-int stream_seek_internal(stream_t *s, off_t newpos)
+int stream_seek_internal(stream_t *s, int64_t newpos)
{
if(newpos==0 || newpos!=s->pos){
switch(s->type){
@@ -405,9 +405,9 @@ if(newpos==0 || newpos!=s->pos){
return -1;
}
-int stream_seek_long(stream_t *s,off_t pos){
+int stream_seek_long(stream_t *s,int64_t pos){
int res;
-off_t newpos=0;
+int64_t newpos=0;
// if( mp_msg_test(MSGT_STREAM,MSGL_DBG3) ) printf("seek_long to 0x%X\n",(unsigned int)pos);
@@ -422,7 +422,7 @@ off_t newpos=0;
if(s->sector_size)
newpos = (pos/s->sector_size)*s->sector_size;
else
- newpos = pos&(~((off_t)STREAM_BUFFER_SIZE-1));
+ newpos = pos&(~((int64_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",