changeset 35879:615c97963ad9

Change off_t to uint64_t. Since we use PRIx64 in the sscanf, a 32-bit off_t would seriously break things and using off_t simply has no advantage at all.
author reimar
date Sat, 16 Mar 2013 08:54:11 +0000
parents 08d53b704b88
children 25429dbfa18e
files sub/vobsub.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/sub/vobsub.c	Sat Mar 16 08:50:08 2013 +0000
+++ b/sub/vobsub.c	Sat Mar 16 08:54:11 2013 +0000
@@ -321,7 +321,7 @@
     return rar_eof(mpeg->stream);
 }
 
-static off_t mpeg_tell(mpeg_t *mpeg)
+static uint64_t mpeg_tell(mpeg_t *mpeg)
 {
     return rar_tell(mpeg->stream);
 }
@@ -481,7 +481,7 @@
 
 typedef struct {
     unsigned int pts100;
-    off_t filepos;
+    uint64_t filepos;
     unsigned int size;
     unsigned char *data;
 } packet_t;
@@ -648,7 +648,7 @@
     return 0;
 }
 
-static int vobsub_add_timestamp(vobsub_t *vob, off_t filepos, int ms)
+static int vobsub_add_timestamp(vobsub_t *vob, uint64_t filepos, int ms)
 {
     packet_queue_t *queue;
     packet_t *pkt;
@@ -696,7 +696,7 @@
 static int vobsub_parse_timestamp(vobsub_t *vob, const char *line)
 {
     int h, m, s, ms;
-    off_t filepos;
+    uint64_t filepos;
     if (sscanf(line, " %02d:%02d:%02d:%03d, filepos: %09"PRIx64"",
                &h, &m, &s, &ms, &filepos) != 5)
         return -1;
@@ -946,7 +946,7 @@
             } else {
                 long last_pts_diff = 0;
                 while (!mpeg_eof(mpg)) {
-                    off_t pos = mpeg_tell(mpg);
+                    uint64_t pos = mpeg_tell(mpg);
                     if (mpeg_run(mpg) < 0) {
                         if (!mpeg_eof(mpg))
                             mp_msg(MSGT_VOBSUB, MSGL_ERR, "VobSub: mpeg_run error\n");