[SCM] libav/experimental: cosmectics, use consistant and homogeneous type names for atoms

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:59:14 UTC 2013


The following commit has been merged in the experimental branch:
commit e23848a49cee6f03df4c092bbdc6bd2189f0a42c
Author: Baptiste Coudurier <baptiste.coudurier at gmail.com>
Date:   Thu Apr 26 11:36:05 2007 +0000

    cosmectics, use consistant and homogeneous type names for atoms
    
    Originally committed as revision 8828 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavformat/isom.h b/libavformat/isom.h
index efcb1fc..9fa49e7 100644
--- a/libavformat/isom.h
+++ b/libavformat/isom.h
@@ -32,9 +32,9 @@ extern const AVCodecTag codec_movaudio_tags[];
 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 */
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 1f53a26..8b69192 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -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, ByteIOContext *pb, MOV_atom_t atom)
 
     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, ByteIOContext *pb, MOV_atom_t atom)
     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, ByteIOContext *pb, MOV_atom_t atom)
     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);
 
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index e934169..818e57b 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -643,7 +643,7 @@ static int mov_write_stsd_tag(ByteIOContext *pb, MOVTrack* track)
 
 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(ByteIOContext *pb, MOVTrack* track)
 /* 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;

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list