changeset 4076:a5c615b9d8ec libavformat

remove _t for POSIX compatibility.
author michael
date Thu, 11 Dec 2008 19:06:24 +0000
parents 56204ba7a2c5
children 72457fa9856a
files nut.c nut.h nutdec.c nutenc.c
diffstat 4 files changed, 13 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/nut.c	Thu Dec 11 18:48:08 2008 +0000
+++ b/nut.c	Thu Dec 11 19:06:24 2008 +0000
@@ -47,16 +47,16 @@
     return  ((lsb - delta)&mask) + delta;
 }
 
-int ff_nut_sp_pos_cmp(syncpoint_t *a, syncpoint_t *b){
+int ff_nut_sp_pos_cmp(Syncpoint *a, Syncpoint *b){
     return ((a->pos - b->pos) >> 32) - ((b->pos - a->pos) >> 32);
 }
 
-int ff_nut_sp_pts_cmp(syncpoint_t *a, syncpoint_t *b){
+int ff_nut_sp_pts_cmp(Syncpoint *a, Syncpoint *b){
     return ((a->ts - b->ts) >> 32) - ((b->ts - a->ts) >> 32);
 }
 
 void ff_nut_add_sp(NUTContext *nut, int64_t pos, int64_t back_ptr, int64_t ts){
-    syncpoint_t *sp= av_mallocz(sizeof(syncpoint_t));
+    Syncpoint *sp= av_mallocz(sizeof(Syncpoint));
     struct AVTreeNode *node= av_mallocz(av_tree_node_size);
 
     sp->pos= pos;
--- a/nut.h	Thu Dec 11 18:48:08 2008 +0000
+++ b/nut.h	Thu Dec 11 19:06:24 2008 +0000
@@ -50,14 +50,14 @@
     FLAG_MATCH_TIME =2048, ///<If set, match_time_delta is coded in the frame header
     FLAG_CODED      =4096, ///<if set, coded_flags are stored in the frame header
     FLAG_INVALID    =8192, ///<if set, frame_code is invalid
-}flag_t;
+} Flag;
 
 typedef struct {
     uint64_t pos;
     uint64_t back_ptr;
 //    uint64_t global_key_pts;
     int64_t ts;
-} syncpoint_t;
+} Syncpoint;
 
 typedef struct {
     uint16_t flags;
@@ -106,8 +106,8 @@
 
 void ff_nut_reset_ts(NUTContext *nut, AVRational time_base, int64_t val);
 int64_t ff_lsb2full(StreamContext *stream, int64_t lsb);
-int ff_nut_sp_pos_cmp(syncpoint_t *a, syncpoint_t *b);
-int ff_nut_sp_pts_cmp(syncpoint_t *a, syncpoint_t *b);
+int ff_nut_sp_pos_cmp(Syncpoint *a, Syncpoint *b);
+int ff_nut_sp_pts_cmp(Syncpoint *a, Syncpoint *b);
 void ff_nut_add_sp(NUTContext *nut, int64_t pos, int64_t back_ptr, int64_t ts);
 
 extern const Dispositions ff_nut_dispositions[];
--- a/nutdec.c	Thu Dec 11 18:48:08 2008 +0000
+++ b/nutdec.c	Thu Dec 11 19:06:24 2008 +0000
@@ -846,9 +846,9 @@
 static int read_seek(AVFormatContext *s, int stream_index, int64_t pts, int flags){
     NUTContext *nut = s->priv_data;
     AVStream *st= s->streams[stream_index];
-    syncpoint_t dummy={.ts= pts*av_q2d(st->time_base)*AV_TIME_BASE};
-    syncpoint_t nopts_sp= {.ts= AV_NOPTS_VALUE, .back_ptr= AV_NOPTS_VALUE};
-    syncpoint_t *sp, *next_node[2]= {&nopts_sp, &nopts_sp};
+    Syncpoint dummy={.ts= pts*av_q2d(st->time_base)*AV_TIME_BASE};
+    Syncpoint nopts_sp= {.ts= AV_NOPTS_VALUE, .back_ptr= AV_NOPTS_VALUE};
+    Syncpoint *sp, *next_node[2]= {&nopts_sp, &nopts_sp};
     int64_t pos, pos2, ts;
     int i;
 
--- a/nutenc.c	Thu Dec 11 18:48:08 2008 +0000
+++ b/nutenc.c	Thu Dec 11 19:06:24 2008 +0000
@@ -260,7 +260,7 @@
     put_byte(bc, val&127);
 }
 
-static void put_t(NUTContext *nut, StreamContext *nus, ByteIOContext *bc, uint64_t val){
+static void put_tt(NUTContext *nut, StreamContext *nus, ByteIOContext *bc, uint64_t val){
     val *= nut->time_base_count;
     val += nus->time_base - nut->time_base;
     put_v(bc, val);
@@ -664,7 +664,7 @@
 //FIXME: Ensure store_sp is 1 in the first place.
 
     if(store_sp){
-        syncpoint_t *sp, dummy= {.pos= INT64_MAX};
+        Syncpoint *sp, dummy= {.pos= INT64_MAX};
 
         ff_nut_reset_ts(nut, *nus->time_base, pkt->dts);
         for(i=0; i<s->nb_streams; i++){
@@ -684,7 +684,7 @@
         ret = url_open_dyn_buf(&dyn_bc);
         if(ret < 0)
             return ret;
-        put_t(nut, nus, dyn_bc, pkt->dts);
+        put_tt(nut, nus, dyn_bc, pkt->dts);
         put_v(dyn_bc, sp ? (nut->last_syncpoint_pos - sp->pos)>>4 : 0);
         put_packet(nut, bc, dyn_bc, 1, SYNCPOINT_STARTCODE);