aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-01-21 01:39:17 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-01-21 01:39:17 +0000
commit7caf0cc62cad8a5548c3e7e0b35ead00584100c8 (patch)
treee1562ae2a42534630673125d7f7712da466f43be
parent5c4e1928c0e79438be23cbec9ce579d790bb985a (diff)
downloadffmpeg-7caf0cc62cad8a5548c3e7e0b35ead00584100c8.tar.gz
add codec_id <-> codec_tag tables to AVIn/OutputFormat
Originally committed as revision 7593 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/aiff.c2
-rw-r--r--libavformat/asf-enc.c9
-rw-r--r--libavformat/au.c2
-rw-r--r--libavformat/avformat.h19
-rw-r--r--libavformat/avienc.c1
-rw-r--r--libavformat/flvenc.c4
-rw-r--r--libavformat/gxfenc.c2
-rw-r--r--libavformat/isom.c2
-rw-r--r--libavformat/isom.h2
-rw-r--r--libavformat/libnut.c2
-rw-r--r--libavformat/mov.c4
-rw-r--r--libavformat/movenc.c4
-rw-r--r--libavformat/nsvdec.c4
-rw-r--r--libavformat/riff.c53
-rw-r--r--libavformat/riff.h30
-rw-r--r--libavformat/swf.c2
-rw-r--r--libavformat/voc.c2
-rw-r--r--libavformat/voc.h2
-rw-r--r--libavformat/wav.c2
19 files changed, 95 insertions, 53 deletions
diff --git a/libavformat/aiff.c b/libavformat/aiff.c
index e4cf66c3b4..d05a366e61 100644
--- a/libavformat/aiff.c
+++ b/libavformat/aiff.c
@@ -23,7 +23,7 @@
#include "riff.h"
#include "intfloat_readwrite.h"
-static const CodecTag codec_aiff_tags[] = {
+static const AVCodecTag codec_aiff_tags[] = {
{ CODEC_ID_PCM_S16BE, MKTAG('N','O','N','E') },
{ CODEC_ID_PCM_S8, MKTAG('N','O','N','E') },
{ CODEC_ID_PCM_S24BE, MKTAG('N','O','N','E') },
diff --git a/libavformat/asf-enc.c b/libavformat/asf-enc.c
index f72fef97a1..62312bd034 100644
--- a/libavformat/asf-enc.c
+++ b/libavformat/asf-enc.c
@@ -187,6 +187,13 @@
2*PAYLOAD_HEADER_SIZE_MULTIPLE_PAYLOADS \
)
+static const AVCodecTag codec_asf_bmp_tags[] = {
+ { CODEC_ID_MPEG4, MKTAG('M', 'P', '4', 'S') },
+ { CODEC_ID_MPEG4, MKTAG('M', '4', 'S', '2') },
+ { CODEC_ID_MSMPEG4V3, MKTAG('M', 'P', '4', '3') },
+ { CODEC_ID_NONE, 0 },
+};
+
static int preroll_time = 2000;
static const uint8_t error_spread_ADPCM_G726[] = { 0x01, 0x90, 0x01, 0x90, 0x01, 0x01, 0x00, 0x00 };
@@ -842,6 +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},
};
#endif
@@ -862,5 +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},
};
#endif //CONFIG_ASF_STREAM_MUXER
diff --git a/libavformat/au.c b/libavformat/au.c
index 27c7cdc850..acc42b4022 100644
--- a/libavformat/au.c
+++ b/libavformat/au.c
@@ -35,7 +35,7 @@
#define AU_UNKOWN_SIZE ((uint32_t)(~0))
/* The ffmpeg codecs we support, and the IDs they have in the file */
-static const CodecTag codec_au_tags[] = {
+static const AVCodecTag codec_au_tags[] = {
{ CODEC_ID_PCM_MULAW, 1 },
{ CODEC_ID_PCM_S16BE, 3 },
{ CODEC_ID_PCM_ALAW, 27 },
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 63e1e83f4f..7ebc880ac6 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -25,8 +25,8 @@
extern "C" {
#endif
-#define LIBAVFORMAT_VERSION_INT ((51<<16)+(7<<8)+0)
-#define LIBAVFORMAT_VERSION 51.7.0
+#define LIBAVFORMAT_VERSION_INT ((51<<16)+(8<<8)+0)
+#define LIBAVFORMAT_VERSION 51.8.0
#define LIBAVFORMAT_BUILD LIBAVFORMAT_VERSION_INT
#define LIBAVFORMAT_IDENT "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION)
@@ -96,6 +96,8 @@ typedef struct AVFrac {
/*************************************************/
/* input/output formats */
+struct AVCodecTag;
+
struct AVFormatContext;
/* this structure contains the data a format has to probe a file */
@@ -155,6 +157,13 @@ typedef struct AVOutputFormat {
/* currently only used to set pixel format if not YUV420P */
int (*set_parameters)(struct AVFormatContext *, AVFormatParameters *);
int (*interleave_packet)(struct AVFormatContext *, AVPacket *out, AVPacket *in, int flush);
+
+ /**
+ * 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];
+
/* private fields */
struct AVOutputFormat *next;
} AVOutputFormat;
@@ -210,6 +219,8 @@ typedef struct AVInputFormat {
(RTSP) */
int (*read_pause)(struct AVFormatContext *);
+ const struct AVCodecTag *codec_tag[4];
+
/* private fields */
struct AVInputFormat *next;
} AVInputFormat;
@@ -396,6 +407,10 @@ 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);
+
/* media file input */
AVInputFormat *av_find_input_format(const char *short_name);
AVInputFormat *av_probe_input_format(AVProbeData *pd, int is_opened);
diff --git a/libavformat/avienc.c b/libavformat/avienc.c
index 8a026e0df5..2c306e308a 100644
--- a/libavformat/avienc.c
+++ b/libavformat/avienc.c
@@ -575,5 +575,6 @@ AVOutputFormat avi_muxer = {
avi_write_header,
avi_write_packet,
avi_write_trailer,
+ .codec_tag= {codec_bmp_tags, codec_wav_tags},
};
#endif //CONFIG_AVI_MUXER
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index ef618db42e..c8c527a8f9 100644
--- a/libavformat/flvenc.c
+++ b/libavformat/flvenc.c
@@ -25,7 +25,7 @@
#undef NDEBUG
#include <assert.h>
-static const CodecTag flv_video_codec_ids[] = {
+static const AVCodecTag flv_video_codec_ids[] = {
{CODEC_ID_FLV1, FLV_CODECID_H263 },
{CODEC_ID_FLASHSV, FLV_CODECID_SCREEN},
{CODEC_ID_VP6F, FLV_CODECID_VP6 },
@@ -33,7 +33,7 @@ static const CodecTag flv_video_codec_ids[] = {
{CODEC_ID_NONE, 0}
};
-static const CodecTag flv_audio_codec_ids[] = {
+static const AVCodecTag flv_audio_codec_ids[] = {
{CODEC_ID_MP3, FLV_CODECID_MP3 >> FLV_AUDIO_CODECID_OFFSET},
{CODEC_ID_PCM_S8, FLV_CODECID_PCM_BE >> FLV_AUDIO_CODECID_OFFSET},
{CODEC_ID_PCM_S16BE, FLV_CODECID_PCM_BE >> FLV_AUDIO_CODECID_OFFSET},
diff --git a/libavformat/gxfenc.c b/libavformat/gxfenc.c
index fef5ec1044..ab44f5ab48 100644
--- a/libavformat/gxfenc.c
+++ b/libavformat/gxfenc.c
@@ -85,7 +85,7 @@ static const GXF_Lines gxf_lines_tab[] = {
{ 720, 6 },
};
-static const CodecTag gxf_media_types[] = {
+static const AVCodecTag gxf_media_types[] = {
{ CODEC_ID_MJPEG , 3 }, /* NTSC */
{ CODEC_ID_MJPEG , 4 }, /* PAL */
{ CODEC_ID_PCM_S24LE , 9 },
diff --git a/libavformat/isom.c b/libavformat/isom.c
index d4e923853b..b3c294a038 100644
--- a/libavformat/isom.c
+++ b/libavformat/isom.c
@@ -26,7 +26,7 @@
#include "isom.h"
/* http://gpac.sourceforge.net/tutorial/mediatypes.htm */
-const CodecTag ff_mov_obj_type[] = {
+const AVCodecTag ff_mov_obj_type[] = {
{ CODEC_ID_MPEG4 , 32 },
{ CODEC_ID_H264 , 33 },
{ CODEC_ID_AAC , 64 },
diff --git a/libavformat/isom.h b/libavformat/isom.h
index 85cbbdc6c9..ea2fc4b6b0 100644
--- a/libavformat/isom.h
+++ b/libavformat/isom.h
@@ -25,7 +25,7 @@
#define FFMPEG_ISOM_H
/* isom.c */
-extern const CodecTag ff_mov_obj_type[];
+extern const AVCodecTag ff_mov_obj_type[];
int ff_mov_iso639_to_lang(const char *lang, int mp4);
int ff_mov_lang_to_iso639(int code, char *to);
diff --git a/libavformat/libnut.c b/libavformat/libnut.c
index 62c3f2b852..d224d8d5c5 100644
--- a/libavformat/libnut.c
+++ b/libavformat/libnut.c
@@ -10,7 +10,7 @@ typedef struct {
nut_stream_header_t * s;
} NUTContext;
-static const CodecTag nut_tags[] = {
+static const AVCodecTag nut_tags[] = {
{ CODEC_ID_MPEG4, MKTAG('m', 'p', '4', 'v') },
{ CODEC_ID_MP3, MKTAG('m', 'p', '3', ' ') },
{ CODEC_ID_VORBIS, MKTAG('v', 'r', 'b', 's') },
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 1658b6d244..74fc0ef326 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -66,7 +66,7 @@
#undef NDEBUG
#include <assert.h>
-static const CodecTag mov_video_tags[] = {
+static const AVCodecTag mov_video_tags[] = {
/* { CODEC_ID_, MKTAG('c', 'v', 'i', 'd') }, *//* Cinepak */
/* { CODEC_ID_H263, MKTAG('r', 'a', 'w', ' ') }, *//* Uncompressed RGB */
/* { CODEC_ID_H263, MKTAG('Y', 'u', 'v', '2') }, *//* Uncompressed YUV422 */
@@ -127,7 +127,7 @@ static const CodecTag mov_video_tags[] = {
{ CODEC_ID_NONE, 0 },
};
-static const CodecTag mov_audio_tags[] = {
+static const AVCodecTag mov_audio_tags[] = {
{ CODEC_ID_PCM_S32BE, MKTAG('i', 'n', '3', '2') },
{ CODEC_ID_PCM_S24BE, MKTAG('i', 'n', '2', '4') },
{ CODEC_ID_PCM_S16BE, MKTAG('N', 'O', 'N', 'E') }, /* uncompressed */
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 56b0f765d7..3391bacace 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -322,7 +322,7 @@ static int mov_write_wave_tag(ByteIOContext *pb, MOVTrack* track)
return updateSize (pb, pos);
}
-static const CodecTag codec_movaudio_tags[] = {
+static const AVCodecTag codec_movaudio_tags[] = {
{ CODEC_ID_PCM_MULAW, MKTAG('u', 'l', 'a', 'w') },
{ CODEC_ID_PCM_ALAW, MKTAG('a', 'l', 'a', 'w') },
{ CODEC_ID_ADPCM_IMA_QT, MKTAG('i', 'm', 'a', '4') },
@@ -526,7 +526,7 @@ static int mov_write_avcc_tag(ByteIOContext *pb, MOVTrack *track)
return updateSize(pb, pos);
}
-static const CodecTag codec_movvideo_tags[] = {
+static const AVCodecTag codec_movvideo_tags[] = {
{ CODEC_ID_SVQ1, MKTAG('S', 'V', 'Q', '1') },
{ CODEC_ID_SVQ3, MKTAG('S', 'V', 'Q', '3') },
{ CODEC_ID_MPEG4, MKTAG('m', 'p', '4', 'v') },
diff --git a/libavformat/nsvdec.c b/libavformat/nsvdec.c
index e3c439a774..af07ccf097 100644
--- a/libavformat/nsvdec.c
+++ b/libavformat/nsvdec.c
@@ -183,7 +183,7 @@ typedef struct {
//DVDemuxContext* dv_demux;
} NSVContext;
-static const CodecTag nsv_codec_video_tags[] = {
+static const AVCodecTag nsv_codec_video_tags[] = {
{ CODEC_ID_VP3, MKTAG('V', 'P', '3', ' ') },
{ CODEC_ID_VP3, MKTAG('V', 'P', '3', '0') },
{ CODEC_ID_VP3, MKTAG('V', 'P', '3', '1') },
@@ -202,7 +202,7 @@ static const CodecTag nsv_codec_video_tags[] = {
{ 0, 0 },
};
-static const CodecTag nsv_codec_audio_tags[] = {
+static const AVCodecTag nsv_codec_audio_tags[] = {
{ CODEC_ID_MP3, MKTAG('M', 'P', '3', ' ') },
{ CODEC_ID_AAC, MKTAG('A', 'A', 'C', ' ') },
{ CODEC_ID_AAC, MKTAG('A', 'A', 'C', 'P') }, /* _CUTTED__MUXED_2 Heads - Out Of The City.nsv */
diff --git a/libavformat/riff.c b/libavformat/riff.c
index 81605cceb3..368028af9b 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -22,10 +22,11 @@
#include "avformat.h"
#include "avcodec.h"
#include "riff.h"
+#include "allformats.h" // for asf_muxer
/* Note: when encoding, the first matching tag is used, so order is
important if multiple tags possible for a given codec. */
-const CodecTag codec_bmp_tags[] = {
+const AVCodecTag codec_bmp_tags[] = {
{ CODEC_ID_H264, MKTAG('H', '2', '6', '4') },
{ CODEC_ID_H264, MKTAG('h', '2', '6', '4') },
{ CODEC_ID_H264, MKTAG('X', '2', '6', '4') },
@@ -42,10 +43,10 @@ const CodecTag codec_bmp_tags[] = {
{ CODEC_ID_H263P, MKTAG('U', '2', '6', '3') },
{ CODEC_ID_H263P, MKTAG('v', 'i', 'v', '1') },
- { CODEC_ID_MPEG4, MKTAG('F', 'M', 'P', '4')},
- { CODEC_ID_MPEG4, MKTAG('D', 'I', 'V', 'X'), .invalid_asf = 1 },
- { CODEC_ID_MPEG4, MKTAG('D', 'X', '5', '0'), .invalid_asf = 1 },
- { CODEC_ID_MPEG4, MKTAG('X', 'V', 'I', 'D'), .invalid_asf = 1 },
+ { CODEC_ID_MPEG4, MKTAG('F', 'M', 'P', '4') },
+ { CODEC_ID_MPEG4, MKTAG('D', 'I', 'V', 'X') },
+ { CODEC_ID_MPEG4, MKTAG('D', 'X', '5', '0') },
+ { CODEC_ID_MPEG4, MKTAG('X', 'V', 'I', 'D') },
{ CODEC_ID_MPEG4, MKTAG('M', 'P', '4', 'S') },
{ CODEC_ID_MPEG4, MKTAG('M', '4', 'S', '2') },
{ CODEC_ID_MPEG4, MKTAG(0x04, 0, 0, 0) }, /* some broken avi use this */
@@ -60,7 +61,7 @@ const CodecTag codec_bmp_tags[] = {
{ CODEC_ID_MPEG4, MKTAG('R', 'M', 'P', '4') },
- { CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '3'), .invalid_asf = 1 }, /* default signature when using MSMPEG4 */
+ { CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '3') }, /* default signature when using MSMPEG4 */
{ CODEC_ID_MSMPEG4V3, MKTAG('M', 'P', '4', '3') },
/* added based on MPlayer */
@@ -168,7 +169,7 @@ const CodecTag codec_bmp_tags[] = {
{ CODEC_ID_NONE, 0 },
};
-const CodecTag codec_wav_tags[] = {
+const AVCodecTag codec_wav_tags[] = {
{ CODEC_ID_MP2, 0x50 },
{ CODEC_ID_MP3, 0x55 },
{ CODEC_ID_AC3, 0x2000 },
@@ -206,7 +207,7 @@ const CodecTag codec_wav_tags[] = {
{ 0, 0 },
};
-unsigned int codec_get_tag(const CodecTag *tags, int id)
+unsigned int codec_get_tag(const AVCodecTag *tags, int id)
{
while (tags->id != CODEC_ID_NONE) {
if (tags->id == id)
@@ -216,17 +217,7 @@ unsigned int codec_get_tag(const CodecTag *tags, int id)
return 0;
}
-unsigned int codec_get_asf_tag(const CodecTag *tags, unsigned int id)
-{
- while (tags->id != CODEC_ID_NONE) {
- if (!tags->invalid_asf && tags->id == id)
- return tags->tag;
- tags++;
- }
- return 0;
-}
-
-enum CodecID codec_get_id(const CodecTag *tags, unsigned int tag)
+enum CodecID codec_get_id(const AVCodecTag *tags, unsigned int tag)
{
while (tags->id != CODEC_ID_NONE) {
if( toupper((tag >> 0)&0xFF) == toupper((tags->tag >> 0)&0xFF)
@@ -239,6 +230,26 @@ enum CodecID codec_get_id(const CodecTag *tags, unsigned int tag)
return CODEC_ID_NONE;
}
+unsigned int av_codec_get_tag(const AVCodecTag *tags[4], enum CodecID id)
+{
+ int i;
+ for(i=0; i<4 && tags[i]; i++){
+ int tag= codec_get_tag(tags[i], id);
+ if(tag) return tag;
+ }
+ return 0;
+}
+
+enum CodecID av_codec_get_id(const AVCodecTag *tags[4], unsigned int tag)
+{
+ int i;
+ for(i=0; i<4 && tags[i]; i++){
+ enum CodecID id= codec_get_id(tags[i], tag);
+ if(id!=CODEC_ID_NONE) return id;
+ }
+ return CODEC_ID_NONE;
+}
+
unsigned int codec_get_bmp_tag(int id)
{
return codec_get_tag(codec_bmp_tags, id);
@@ -367,7 +378,7 @@ int put_wav_header(ByteIOContext *pb, AVCodecContext *enc)
}
/* BITMAPINFOHEADER header */
-void put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, const CodecTag *tags, int for_asf)
+void put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, const AVCodecTag *tags, int for_asf)
{
put_le32(pb, 40 + enc->extradata_size); /* size */
put_le32(pb, enc->width);
@@ -376,7 +387,7 @@ void put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, const CodecTag *tags
put_le16(pb, enc->bits_per_sample ? enc->bits_per_sample : 24); /* depth */
/* compression type */
- put_le32(pb, for_asf ? (enc->codec_tag ? enc->codec_tag : codec_get_asf_tag(tags, enc->codec_id)) : enc->codec_tag); //
+ put_le32(pb, for_asf ? (enc->codec_tag ? enc->codec_tag : av_codec_get_tag(asf_muxer.codec_tag, enc->codec_id)) : enc->codec_tag); //
put_le32(pb, enc->width * enc->height * 3);
put_le32(pb, 0);
put_le32(pb, 0);
diff --git a/libavformat/riff.h b/libavformat/riff.h
index 240855a8b2..45c72dde68 100644
--- a/libavformat/riff.h
+++ b/libavformat/riff.h
@@ -19,33 +19,37 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+/**
+ * @file riff.h
+ * internal header for RIFF based (de)muxers
+ * do NOT include this in end user applications
+ */
+
#ifndef FF_RIFF_H
#define FF_RIFF_H
offset_t start_tag(ByteIOContext *pb, const char *tag);
void end_tag(ByteIOContext *pb, offset_t start);
-typedef struct CodecTag {
+typedef struct AVCodecTag {
int id;
unsigned int tag;
- unsigned int invalid_asf : 1;
-} CodecTag;
+} AVCodecTag;
-void put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, const CodecTag *tags, int for_asf);
+void put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, const AVCodecTag *tags, int for_asf);
int put_wav_header(ByteIOContext *pb, AVCodecContext *enc);
int wav_codec_get_id(unsigned int tag, int bps);
void get_wav_header(ByteIOContext *pb, AVCodecContext *codec, int size);
-extern const CodecTag codec_bmp_tags[];
-extern const CodecTag codec_wav_tags[];
+extern const AVCodecTag codec_bmp_tags[];
+extern const AVCodecTag codec_wav_tags[];
-unsigned int codec_get_tag(const CodecTag *tags, int id);
-enum CodecID codec_get_id(const CodecTag *tags, unsigned int tag);
-unsigned int codec_get_bmp_tag(int id);
-unsigned int codec_get_wav_tag(int id);
-enum CodecID codec_get_bmp_id(unsigned int tag);
-enum CodecID codec_get_wav_id(unsigned int tag);
-unsigned int codec_get_asf_tag(const CodecTag *tags, unsigned int id);
+unsigned int codec_get_tag(const AVCodecTag *tags, int id);
+enum CodecID codec_get_id(const AVCodecTag *tags, unsigned int tag);
+unsigned int codec_get_bmp_tag(int id) attribute_deprecated; //use av_codec_get_tag
+unsigned int codec_get_wav_tag(int id) attribute_deprecated; //use av_codec_get_tag
+enum CodecID codec_get_bmp_id(unsigned int tag) attribute_deprecated; //use av_codec_get_id
+enum CodecID codec_get_wav_id(unsigned int tag) attribute_deprecated; //use av_codec_get_id
void ff_parse_specific_params(AVCodecContext *stream, int *au_rate, int *au_ssize, int *au_scale);
#endif
diff --git a/libavformat/swf.c b/libavformat/swf.c
index 438ca52af9..3195f8c58a 100644
--- a/libavformat/swf.c
+++ b/libavformat/swf.c
@@ -80,7 +80,7 @@ typedef struct {
int audio_type;
} SWFContext;
-static const CodecTag swf_codec_tags[] = {
+static const AVCodecTag swf_codec_tags[] = {
{CODEC_ID_FLV1, 0x02},
{CODEC_ID_VP6F, 0x04},
{0, 0},
diff --git a/libavformat/voc.c b/libavformat/voc.c
index 329f07739c..97b73d1639 100644
--- a/libavformat/voc.c
+++ b/libavformat/voc.c
@@ -23,7 +23,7 @@
const unsigned char voc_magic[21] = "Creative Voice File\x1A";
-const CodecTag voc_codec_tags[] = {
+const AVCodecTag voc_codec_tags[] = {
{CODEC_ID_PCM_U8, 0x00},
{CODEC_ID_ADPCM_SBPRO_4, 0x01},
{CODEC_ID_ADPCM_SBPRO_3, 0x02},
diff --git a/libavformat/voc.h b/libavformat/voc.h
index 16adb00782..9b2bb8cce1 100644
--- a/libavformat/voc.h
+++ b/libavformat/voc.h
@@ -43,7 +43,7 @@ typedef enum voc_type {
} voc_type_t;
extern const unsigned char voc_magic[21];
-extern const CodecTag voc_codec_tags[];
+extern const AVCodecTag voc_codec_tags[];
int voc_get_packet(AVFormatContext *s, AVPacket *pkt,
AVStream *st, int max_size);
diff --git a/libavformat/wav.c b/libavformat/wav.c
index 7fb9823498..72e4507df6 100644
--- a/libavformat/wav.c
+++ b/libavformat/wav.c
@@ -235,6 +235,7 @@ AVInputFormat wav_demuxer = {
wav_read_packet,
wav_read_close,
wav_read_seek,
+ .codec_tag= {codec_wav_tags},
};
#endif
#ifdef CONFIG_WAV_MUXER
@@ -249,5 +250,6 @@ AVOutputFormat wav_muxer = {
wav_write_header,
wav_write_packet,
wav_write_trailer,
+ .codec_tag= {codec_wav_tags},
};
#endif