aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-01-21 12:08:31 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-01-21 12:08:31 +0000
commit6c77805fc84a63b74e5025b4d7eeea24c8138cf3 (patch)
tree740e6a723ac8d45f686f7842068d65f337f4b549
parent5484dad7f6122a4d4dbc28e867a8c71d22ba2297 (diff)
downloadffmpeg-6c77805fc84a63b74e5025b4d7eeea24c8138cf3.tar.gz
get rid of the [4] limitation of codec tag lists
Originally committed as revision 7596 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/aiff.c4
-rw-r--r--libavformat/asf-enc.c4
-rw-r--r--libavformat/au.c4
-rw-r--r--libavformat/avformat.h8
-rw-r--r--libavformat/avienc.c2
-rw-r--r--libavformat/flvenc.c2
-rw-r--r--libavformat/riff.c4
-rw-r--r--libavformat/vocdec.c2
-rw-r--r--libavformat/vocenc.c2
-rw-r--r--libavformat/wav.c4
10 files changed, 18 insertions, 18 deletions
diff --git a/libavformat/aiff.c b/libavformat/aiff.c
index 6de82872c7..8fa61948be 100644
--- a/libavformat/aiff.c
+++ b/libavformat/aiff.c
@@ -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
diff --git a/libavformat/asf-enc.c b/libavformat/asf-enc.c
index 62312bd034..11bdce4e33 100644
--- a/libavformat/asf-enc.c
+++ b/libavformat/asf-enc.c
@@ -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
diff --git a/libavformat/au.c b/libavformat/au.c
index 0ec089b15a..4bd8b1e253 100644
--- a/libavformat/au.c
+++ b/libavformat/au.c
@@ -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
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 7ebc880ac6..b3c398e8d2 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -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);
diff --git a/libavformat/avienc.c b/libavformat/avienc.c
index 2c306e308a..ac8b2670de 100644
--- a/libavformat/avienc.c
+++ b/libavformat/avienc.c
@@ -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
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index 1bc0f9f63b..e587967595 100644
--- a/libavformat/flvenc.c
+++ b/libavformat/flvenc.c
@@ -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},
};
diff --git a/libavformat/riff.c b/libavformat/riff.c
index 368028af9b..08371a3aeb 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -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;
}
diff --git a/libavformat/vocdec.c b/libavformat/vocdec.c
index f13120ef11..21ef8c2071 100644
--- a/libavformat/vocdec.c
+++ b/libavformat/vocdec.c
@@ -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},
};
diff --git a/libavformat/vocenc.c b/libavformat/vocenc.c
index 5b6e3c1680..590aa4854e 100644
--- a/libavformat/vocenc.c
+++ b/libavformat/vocenc.c
@@ -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},
};
diff --git a/libavformat/wav.c b/libavformat/wav.c
index 72e4507df6..f3ede5185b 100644
--- a/libavformat/wav.c
+++ b/libavformat/wav.c
@@ -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