Mercurial > libavformat.hg
changeset 1683:8b062c65fe0d libavformat
remove now useless codec_tag setting code in muxers
author | michael |
---|---|
date | Sun, 21 Jan 2007 12:44:58 +0000 |
parents | 1c6ee4cf8a38 |
children | f4a826a2215a |
files | aiff.c asf-enc.c au.c flvenc.c riff.c |
diffstat | 5 files changed, 4 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/aiff.c Sun Jan 21 12:43:29 2007 +0000 +++ b/aiff.c Sun Jan 21 12:44:58 2007 +0000 @@ -165,7 +165,6 @@ AVExtFloat sample_rate; /* First verify if format is ok */ - enc->codec_tag = codec_get_tag(codec_aiff_tags, enc->codec_id); if (!enc->codec_tag) { av_free(aiff); return -1;
--- a/asf-enc.c Sun Jan 21 12:43:29 2007 +0000 +++ b/asf-enc.c Sun Jan 21 12:44:58 2007 +0000 @@ -459,15 +459,11 @@ if (enc->codec_type == CODEC_TYPE_AUDIO) { put_le16(pb, 2); if(!enc->codec_tag) - enc->codec_tag = codec_get_tag(codec_wav_tags, enc->codec_id); - if(!enc->codec_tag) return -1; put_le16(pb, enc->codec_tag); } else { put_le16(pb, 4); if(!enc->codec_tag) - enc->codec_tag = codec_get_tag(codec_bmp_tags, enc->codec_id); - if(!enc->codec_tag) return -1; put_le32(pb, enc->codec_tag); }
--- a/au.c Sun Jan 21 12:43:29 2007 +0000 +++ b/au.c Sun Jan 21 12:44:58 2007 +0000 @@ -47,8 +47,6 @@ static int put_au_header(ByteIOContext *pb, AVCodecContext *enc) { if(!enc->codec_tag) - enc->codec_tag = codec_get_tag(codec_au_tags, enc->codec_id); - if(!enc->codec_tag) return -1; put_tag(pb, ".snd"); /* magic number */ put_be32(pb, 24); /* header size */
--- a/flvenc.c Sun Jan 21 12:43:29 2007 +0000 +++ b/flvenc.c Sun Jan 21 12:44:58 2007 +0000 @@ -145,7 +145,7 @@ } flv->hasVideo=1; - videocodecid = codec_get_tag(flv_video_codec_ids, enc->codec_id); + videocodecid = enc->codec_tag; if(videocodecid == 0) { av_log(enc, AV_LOG_ERROR, "video codec not compatible with flv\n"); return -1; @@ -155,7 +155,7 @@ samplerate = enc->sample_rate; channels = enc->channels; - audiocodecid = codec_get_tag(flv_audio_codec_ids, enc->codec_id); + audiocodecid = enc->codec_tag; samplesize = (enc->codec_id == CODEC_ID_PCM_S8) ? 8 : 16; if(get_audio_flags(enc)<0) @@ -282,7 +282,7 @@ if (enc->codec_type == CODEC_TYPE_VIDEO) { put_byte(pb, FLV_TAG_TYPE_VIDEO); - flags = codec_get_tag(flv_video_codec_ids, enc->codec_id); + flags = enc->codec_tag; if(flags == 0) { av_log(enc, AV_LOG_ERROR, "video codec %X not compatible with flv\n",enc->codec_id); return -1;
--- a/riff.c Sun Jan 21 12:43:29 2007 +0000 +++ b/riff.c Sun Jan 21 12:44:58 2007 +0000 @@ -296,8 +296,6 @@ int hdrsize = 18; if(!enc->codec_tag || enc->codec_tag > 0xffff) - enc->codec_tag = codec_get_tag(codec_wav_tags, enc->codec_id); - if(!enc->codec_tag || enc->codec_tag > 0xffff) return -1; put_le16(pb, enc->codec_tag); @@ -387,7 +385,7 @@ 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 : av_codec_get_tag(asf_muxer.codec_tag, enc->codec_id)) : enc->codec_tag); // + put_le32(pb, enc->codec_tag); put_le32(pb, enc->width * enc->height * 3); put_le32(pb, 0); put_le32(pb, 0);