]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
get rid of the [4] limitation of codec tag lists
authormichael <michael@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sun, 21 Jan 2007 12:08:31 +0000 (12:08 +0000)
committermichael <michael@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sun, 21 Jan 2007 12:08:31 +0000 (12:08 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@7596 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavformat/aiff.c
libavformat/asf-enc.c
libavformat/au.c
libavformat/avformat.h
libavformat/avienc.c
libavformat/flvenc.c
libavformat/riff.c
libavformat/vocdec.c
libavformat/vocenc.c
libavformat/wav.c

index 6de82872c784f002751ee18884c682ad4bcbba0a..8fa61948be7ceabd951ddd1b6435e848b796932a 100644 (file)
@@ -417,7 +417,7 @@ AVInputFormat aiff_demuxer = {
     aiff_read_packet,
     aiff_read_close,
     aiff_read_seek,
-    .codec_tag= {codec_aiff_tags},
+    .codec_tag= (const AVCodecTag*[]){codec_aiff_tags, 0},
 };
 #endif
 
@@ -433,6 +433,6 @@ AVOutputFormat aiff_muxer = {
     aiff_write_header,
     aiff_write_packet,
     aiff_write_trailer,
-    .codec_tag= {codec_aiff_tags},
+    .codec_tag= (const AVCodecTag*[]){codec_aiff_tags, 0},
 };
 #endif
index 62312bd034d72f466a0584ae4d7c6d9e81a64d46..11bdce4e335a410c1d2e633925977d48ce7a190b 100644 (file)
@@ -849,7 +849,7 @@ AVOutputFormat asf_muxer = {
     asf_write_packet,
     asf_write_trailer,
     .flags = AVFMT_GLOBALHEADER,
-    .codec_tag= {codec_asf_bmp_tags, codec_bmp_tags, codec_wav_tags},
+    .codec_tag= (const AVCodecTag*[]){codec_asf_bmp_tags, codec_bmp_tags, codec_wav_tags, 0},
 };
 #endif
 
@@ -870,6 +870,6 @@ AVOutputFormat asf_stream_muxer = {
     asf_write_packet,
     asf_write_trailer,
     .flags = AVFMT_GLOBALHEADER,
-    .codec_tag= {codec_asf_bmp_tags, codec_bmp_tags, codec_wav_tags},
+    .codec_tag= (const AVCodecTag*[]){codec_asf_bmp_tags, codec_bmp_tags, codec_wav_tags, 0},
 };
 #endif //CONFIG_ASF_STREAM_MUXER
index 0ec089b15a9ad7ccae536110c61bd5d44140898e..4bd8b1e25388bdcf478e07ae67cd64c465cf7243 100644 (file)
@@ -190,7 +190,7 @@ AVInputFormat au_demuxer = {
     au_read_packet,
     au_read_close,
     pcm_read_seek,
-    .codec_tag= {codec_au_tags},
+    .codec_tag= (const AVCodecTag*[]){codec_au_tags, 0},
 };
 #endif
 
@@ -206,6 +206,6 @@ AVOutputFormat au_muxer = {
     au_write_header,
     au_write_packet,
     au_write_trailer,
-    .codec_tag= {codec_au_tags},
+    .codec_tag= (const AVCodecTag*[]){codec_au_tags, 0},
 };
 #endif //CONFIG_AU_MUXER
index 7ebc880ac63682547714aee68aaebccccda0d599..b3c398e8d2c9e54afa833d39771c35d947ac949a 100644 (file)
@@ -162,7 +162,7 @@ typedef struct AVOutputFormat {
      * list of supported codec_id-codec_tag pairs, ordered by "better choice first"
      * the arrays are all CODEC_ID_NONE terminated
      */
-    const struct AVCodecTag *codec_tag[4];
+    const struct AVCodecTag **codec_tag;
 
     /* private fields */
     struct AVOutputFormat *next;
@@ -219,7 +219,7 @@ typedef struct AVInputFormat {
        (RTSP) */
     int (*read_pause)(struct AVFormatContext *);
 
-    const struct AVCodecTag *codec_tag[4];
+    const struct AVCodecTag **codec_tag;
 
     /* private fields */
     struct AVInputFormat *next;
@@ -408,8 +408,8 @@ void av_pkt_dump(FILE *f, AVPacket *pkt, int dump_payload);
 void av_register_all(void);
 
 /* codec tag <-> codec id */
-enum CodecID av_codec_get_id(const struct AVCodecTag *tags[4], unsigned int tag);
-unsigned int av_codec_get_tag(const struct AVCodecTag *tags[4], enum CodecID id);
+enum CodecID av_codec_get_id(const struct AVCodecTag **tags, unsigned int tag);
+unsigned int av_codec_get_tag(const struct AVCodecTag **tags, enum CodecID id);
 
 /* media file input */
 AVInputFormat *av_find_input_format(const char *short_name);
index 2c306e308ad96391471056d2b52a0e2f3881a011..ac8b2670de2af176b407cf90486278332d4204e6 100644 (file)
@@ -575,6 +575,6 @@ AVOutputFormat avi_muxer = {
     avi_write_header,
     avi_write_packet,
     avi_write_trailer,
-    .codec_tag= {codec_bmp_tags, codec_wav_tags},
+    .codec_tag= (const AVCodecTag*[]){codec_bmp_tags, codec_wav_tags, 0},
 };
 #endif //CONFIG_AVI_MUXER
index 1bc0f9f63be6bd4826db3d01069ca7f89a482e31..e5879675957436e2431ae3e67b3a147aaaaf5064 100644 (file)
@@ -332,5 +332,5 @@ AVOutputFormat flv_muxer = {
     flv_write_header,
     flv_write_packet,
     flv_write_trailer,
-    .codec_tag= {flv_video_codec_ids, flv_audio_codec_ids},
+    .codec_tag= (const AVCodecTag*[]){flv_video_codec_ids, flv_audio_codec_ids, 0},
 };
index 368028af9b04a40174c6e93121627e52f87abb1f..08371a3aeb5ff075bb9ef470d3e45232ce39b26d 100644 (file)
@@ -233,7 +233,7 @@ enum CodecID codec_get_id(const AVCodecTag *tags, unsigned int tag)
 unsigned int av_codec_get_tag(const AVCodecTag *tags[4], enum CodecID id)
 {
     int i;
-    for(i=0; i<4 && tags[i]; i++){
+    for(i=0; tags && tags[i]; i++){
         int tag= codec_get_tag(tags[i], id);
         if(tag) return tag;
     }
@@ -243,7 +243,7 @@ unsigned int av_codec_get_tag(const AVCodecTag *tags[4], enum CodecID id)
 enum CodecID av_codec_get_id(const AVCodecTag *tags[4], unsigned int tag)
 {
     int i;
-    for(i=0; i<4 && tags[i]; i++){
+    for(i=0; tags && tags[i]; i++){
         enum CodecID id= codec_get_id(tags[i], tag);
         if(id!=CODEC_ID_NONE) return id;
     }
index f13120ef110fd4de8f904b599886829bac28f837..21ef8c2071c07703af3dfb32ca80f251895fec64 100644 (file)
@@ -152,5 +152,5 @@ AVInputFormat voc_demuxer = {
     voc_read_header,
     voc_read_packet,
     voc_read_close,
-    .codec_tag={voc_codec_tags},
+    .codec_tag=(const AVCodecTag*[]){voc_codec_tags, 0},
 };
index 5b6e3c168050cf9510f36cff2e930bc064faeb39..590aa4854e7a6f04ced884c07fbf70fd6ad177d3 100644 (file)
@@ -101,5 +101,5 @@ AVOutputFormat voc_muxer = {
     voc_write_header,
     voc_write_packet,
     voc_write_trailer,
-    .codec_tag={voc_codec_tags},
+    .codec_tag=(const AVCodecTag*[]){voc_codec_tags, 0},
 };
index 72e4507df601d4201295a768674cbf7a1f58e1b8..f3ede5185b156e64da4d613dac02ead287a7ca93 100644 (file)
@@ -235,7 +235,7 @@ AVInputFormat wav_demuxer = {
     wav_read_packet,
     wav_read_close,
     wav_read_seek,
-    .codec_tag= {codec_wav_tags},
+    .codec_tag= (const AVCodecTag*[]){codec_wav_tags, 0},
 };
 #endif
 #ifdef CONFIG_WAV_MUXER
@@ -250,6 +250,6 @@ AVOutputFormat wav_muxer = {
     wav_write_header,
     wav_write_packet,
     wav_write_trailer,
-    .codec_tag= {codec_wav_tags},
+    .codec_tag= (const AVCodecTag*[]){codec_wav_tags, 0},
 };
 #endif