changeset 35266:ceb148e1fe31

Change STREAM_CTRL_GET_SIZE argument type from off_t to uint64_t. Also fix the incorrect type of the uint64_res variable.
author reimar
date Tue, 06 Nov 2012 17:31:23 +0000
parents 54a706166f5d
children e057379d9360
files libmpdemux/demux_lavf.c libmpdemux/muxer_lavf.c stream/cache2.c stream/stream_ffmpeg.c stream/stream_file.c stream/stream_smb.c
diffstat 6 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_lavf.c	Tue Nov 06 15:53:41 2012 +0000
+++ b/libmpdemux/demux_lavf.c	Tue Nov 06 17:31:23 2012 +0000
@@ -106,7 +106,7 @@
     else if(whence == SEEK_SET)
         pos += stream->start_pos;
     else if(whence == AVSEEK_SIZE && stream->end_pos > 0) {
-        off_t size;
+        uint64_t size;
         stream_control(stream, STREAM_CTRL_GET_SIZE, &size);
         if (size > stream->end_pos)
             stream->end_pos = size;
--- a/libmpdemux/muxer_lavf.c	Tue Nov 06 15:53:41 2012 +0000
+++ b/libmpdemux/muxer_lavf.c	Tue Nov 06 17:31:23 2012 +0000
@@ -96,7 +96,7 @@
 	}
 	else if(whence == SEEK_END)
 	{
-		off_t size=0;
+		uint64_t size=0;
 		if(stream_control(muxer->stream, STREAM_CTRL_GET_SIZE, &size) == STREAM_UNSUPPORTED || size < pos)
 			return -1;
 		pos = size - pos;
--- a/stream/cache2.c	Tue Nov 06 15:53:41 2012 +0000
+++ b/stream/cache2.c	Tue Nov 06 17:31:23 2012 +0000
@@ -264,7 +264,7 @@
 static int cache_execute_control(cache_vars_t *s) {
   double double_res;
   unsigned uint_res;
-  unsigned uint64_res;
+  uint64_t uint64_res;
   int needs_flush = 0;
   static unsigned last;
   int quit = s->control == -2;
@@ -693,7 +693,7 @@
       *(unsigned *)arg = s->control_uint_arg;
       break;
     case STREAM_CTRL_GET_SIZE:
-      *(off_t *)arg = s->control_uint_arg;
+      *(uint64_t *)arg = s->control_uint_arg;
       break;
     case STREAM_CTRL_GET_LANG:
       *(struct stream_lang_req *)arg = s->control_lang_arg;
--- a/stream/stream_ffmpeg.c	Tue Nov 06 15:53:41 2012 +0000
+++ b/stream/stream_ffmpeg.c	Tue Nov 06 17:31:23 2012 +0000
@@ -61,7 +61,7 @@
     case STREAM_CTRL_GET_SIZE:
         size = avio_size(s->priv);
         if(size >= 0) {
-            *(off_t *)arg = size;
+            *(uint64_t *)arg = size;
             return 1;
         }
         break;
--- a/stream/stream_file.c	Tue Nov 06 15:53:41 2012 +0000
+++ b/stream/stream_file.c	Tue Nov 06 17:31:23 2012 +0000
@@ -106,7 +106,7 @@
       size = lseek(s->fd, 0, SEEK_END);
       lseek(s->fd, s->pos, SEEK_SET);
       if(size != (off_t)-1) {
-        *((off_t*)arg) = size;
+        *(uint64_t*)arg = size;
         return 1;
       }
     }
--- a/stream/stream_smb.c	Tue Nov 06 15:53:41 2012 +0000
+++ b/stream/stream_smb.c	Tue Nov 06 17:31:23 2012 +0000
@@ -78,7 +78,7 @@
       off_t size = smbc_lseek(s->fd,0,SEEK_END);
       smbc_lseek(s->fd,s->pos,SEEK_SET);
       if(size != (off_t)-1) {
-        *((off_t*)arg) = size;
+        *(uint64_t *)arg = size;
         return 1;
       }
     }