[Ffmpeg-cvslog] r8828 - in trunk/libavformat: isom.h mov.c movenc.c

bcoudurier subversion
Thu Apr 26 13:36:05 CEST 2007


Author: bcoudurier
Date: Thu Apr 26 13:36:05 2007
New Revision: 8828

Log:
cosmectics, use consistant and homogeneous type names for atoms

Modified:
   trunk/libavformat/isom.h
   trunk/libavformat/mov.c
   trunk/libavformat/movenc.c

Modified: trunk/libavformat/isom.h
==============================================================================
--- trunk/libavformat/isom.h	(original)
+++ trunk/libavformat/isom.h	Thu Apr 26 13:36:05 2007
@@ -32,9 +32,9 @@ extern const AVCodecTag codec_movaudio_t
 int ff_mov_iso639_to_lang(const char *lang, int mp4);
 int ff_mov_lang_to_iso639(int code, char *to);
 
-typedef struct Time2Sample{
+typedef struct {
     int count;
     int duration;
-}Time2Sample;
+} MOV_stts_t;
 
 #endif /* FFMPEG_ISOM_H */

Modified: trunk/libavformat/mov.c
==============================================================================
--- trunk/libavformat/mov.c	(original)
+++ trunk/libavformat/mov.c	Thu Apr 26 13:36:05 2007
@@ -63,11 +63,11 @@
  * Here we just use what is needed to read the chunks
  */
 
-typedef struct MOV_sample_to_chunk_tbl {
+typedef struct {
     int first;
     int count;
     int id;
-} MOV_sample_to_chunk_tbl;
+} MOV_stsc_t;
 
 typedef struct {
     uint32_t type;
@@ -75,10 +75,10 @@ typedef struct {
     int64_t size; /* total size (excluding the size and type fields) */
 } MOV_atom_t;
 
-typedef struct MOV_mdat_atom_s {
+typedef struct {
     offset_t offset;
     int64_t size;
-} MOV_mdat_atom_t;
+} MOV_mdat_t;
 
 struct MOVParseTableEntry;
 
@@ -88,12 +88,12 @@ typedef struct MOVStreamContext {
     unsigned int chunk_count;
     int64_t *chunk_offsets;
     unsigned int stts_count;
-    Time2Sample *stts_data;
+    MOV_stts_t *stts_data;
     unsigned int ctts_count;
-    Time2Sample *ctts_data;
+    MOV_stts_t *ctts_data;
     unsigned int edit_count; /* number of 'edit' (elst atom) */
     unsigned int sample_to_chunk_sz;
-    MOV_sample_to_chunk_tbl *sample_to_chunk;
+    MOV_stsc_t *sample_to_chunk;
     int sample_to_ctime_index;
     int sample_to_ctime_sample;
     unsigned int sample_size;
@@ -123,7 +123,7 @@ typedef struct MOVContext {
     /* NOTE: for recursion save to/ restore from local variable! */
 
     AVPaletteControl palette_control;
-    MOV_mdat_atom_t *mdat_list;
+    MOV_mdat_t *mdat_list;
     int mdat_count;
     DVDemuxContext *dv_demux;
     AVFormatContext *dv_fctx;
@@ -860,13 +860,13 @@ static int mov_read_stsc(MOVContext *c, 
 
     entries = get_be32(pb);
 
-    if(entries >= UINT_MAX / sizeof(MOV_sample_to_chunk_tbl))
+    if(entries >= UINT_MAX / sizeof(MOV_stsc_t))
         return -1;
 
     dprintf(c->fc, "track[%i].stsc.entries = %i\n", c->fc->nb_streams-1, entries);
 
     sc->sample_to_chunk_sz = entries;
-    sc->sample_to_chunk = av_malloc(entries * sizeof(MOV_sample_to_chunk_tbl));
+    sc->sample_to_chunk = av_malloc(entries * sizeof(MOV_stsc_t));
     if (!sc->sample_to_chunk)
         return -1;
     for(i=0; i<entries; i++) {
@@ -948,11 +948,11 @@ static int mov_read_stts(MOVContext *c, 
     get_byte(pb); /* version */
     get_byte(pb); get_byte(pb); get_byte(pb); /* flags */
     entries = get_be32(pb);
-    if(entries >= UINT_MAX / sizeof(Time2Sample))
+    if(entries >= UINT_MAX / sizeof(MOV_stts_t))
         return -1;
 
     sc->stts_count = entries;
-    sc->stts_data = av_malloc(entries * sizeof(Time2Sample));
+    sc->stts_data = av_malloc(entries * sizeof(MOV_stts_t));
 
     dprintf(c->fc, "track[%i].stts.entries = %i\n", c->fc->nb_streams-1, entries);
 
@@ -990,11 +990,11 @@ static int mov_read_ctts(MOVContext *c, 
     get_byte(pb); /* version */
     get_byte(pb); get_byte(pb); get_byte(pb); /* flags */
     entries = get_be32(pb);
-    if(entries >= UINT_MAX / sizeof(Time2Sample))
+    if(entries >= UINT_MAX / sizeof(MOV_stts_t))
         return -1;
 
     sc->ctts_count = entries;
-    sc->ctts_data = av_malloc(entries * sizeof(Time2Sample));
+    sc->ctts_data = av_malloc(entries * sizeof(MOV_stts_t));
 
     dprintf(c->fc, "track[%i].ctts.entries = %i\n", c->fc->nb_streams-1, entries);
 

Modified: trunk/libavformat/movenc.c
==============================================================================
--- trunk/libavformat/movenc.c	(original)
+++ trunk/libavformat/movenc.c	Thu Apr 26 13:36:05 2007
@@ -643,7 +643,7 @@ static int mov_write_stsd_tag(ByteIOCont
 
 static int mov_write_ctts_tag(ByteIOContext *pb, MOVTrack* track)
 {
-    Time2Sample *ctts_entries;
+    MOV_stts_t *ctts_entries;
     uint32_t entries = 0;
     uint32_t atom_size;
     int i;
@@ -677,7 +677,7 @@ static int mov_write_ctts_tag(ByteIOCont
 /* Time to sample atom */
 static int mov_write_stts_tag(ByteIOContext *pb, MOVTrack* track)
 {
-    Time2Sample *stts_entries;
+    MOV_stts_t *stts_entries;
     uint32_t entries = -1;
     uint32_t atom_size;
     int i;




More information about the ffmpeg-cvslog mailing list