diff avienc.c @ 3973:549a09cf23fe libavformat

Remove offset_t typedef and use int64_t directly instead. The name offset_t is easily confused with the standard off_t type and *_t is POSIX reserved namespace if any POSIX header is included.
author diego
date Fri, 03 Oct 2008 10:16:29 +0000
parents b2977baec240
children 1f857a4519bd
line wrap: on
line diff
--- a/avienc.c	Thu Oct 02 21:15:48 2008 +0000
+++ b/avienc.c	Fri Oct 03 10:16:29 2008 +0000
@@ -35,15 +35,15 @@
 #define AVI_INDEX_CLUSTER_SIZE 16384
 
 typedef struct AVIIndex {
-    offset_t    indx_start;
+    int64_t     indx_start;
     int         entry;
     int         ents_allocated;
     AVIIentry** cluster;
 } AVIIndex;
 
 typedef struct {
-    offset_t riff_start, movi_list, odml_list;
-    offset_t frames_hdr_all, frames_hdr_strm[MAX_STREAMS];
+    int64_t riff_start, movi_list, odml_list;
+    int64_t frames_hdr_all, frames_hdr_strm[MAX_STREAMS];
     int audio_strm_length[MAX_STREAMS];
     int riff_id;
     int packet_count[MAX_STREAMS];
@@ -58,10 +58,10 @@
     return &idx->cluster[cl][id];
 }
 
-static offset_t avi_start_new_riff(AVIContext *avi, ByteIOContext *pb,
-                                   const char* riff_tag, const char* list_tag)
+static int64_t avi_start_new_riff(AVIContext *avi, ByteIOContext *pb,
+                                  const char* riff_tag, const char* list_tag)
 {
-    offset_t loff;
+    int64_t loff;
     int i;
 
     avi->riff_id++;
@@ -108,7 +108,7 @@
     ByteIOContext *pb = s->pb;
     AVIContext *avi = s->priv_data;
     int n, au_byterate, au_ssize, au_scale, nb_frames = 0;
-    offset_t file_size;
+    int64_t file_size;
     AVCodecContext* stream;
 
     file_size = url_ftell(pb);
@@ -141,7 +141,7 @@
     ByteIOContext *pb = s->pb;
     int bitrate, n, i, nb_frames, au_byterate, au_ssize, au_scale;
     AVCodecContext *stream, *video_enc;
-    offset_t list1, list2, strh, strf;
+    int64_t list1, list2, strh, strf;
 
     /* header list */
     avi->riff_id = 0;
@@ -375,7 +375,7 @@
         return -1;
 
     for (i=0;i<s->nb_streams;i++) {
-         offset_t ix, pos;
+         int64_t ix, pos;
 
          avi_stream2fourcc(&tag[0], i, s->streams[i]->codec->codec_type);
          ix_tag[3] = '0' + i;
@@ -422,7 +422,7 @@
 {
     ByteIOContext *pb = s->pb;
     AVIContext *avi = s->priv_data;
-    offset_t idx_chunk;
+    int64_t idx_chunk;
     int i;
     char tag[5];
 
@@ -543,7 +543,7 @@
     ByteIOContext *pb = s->pb;
     int res = 0;
     int i, j, n, nb_frames;
-    offset_t file_size;
+    int64_t file_size;
 
     if (!url_is_streamed(pb)){
         if (avi->riff_id == 1) {