aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-01-21 12:44:58 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-01-21 12:44:58 +0000
commitbb85077fc97b186c270ba82f820b2ec6928d05c6 (patch)
treeed1ce352159e32d666357e934193d4e9eab53f2c /libavformat
parent07495657fb32501c1a8b1361ca5680ded1364cd5 (diff)
downloadffmpeg-bb85077fc97b186c270ba82f820b2ec6928d05c6.tar.gz
remove now useless codec_tag setting code in muxers
Originally committed as revision 7603 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/aiff.c1
-rw-r--r--libavformat/asf-enc.c4
-rw-r--r--libavformat/au.c2
-rw-r--r--libavformat/flvenc.c6
-rw-r--r--libavformat/riff.c4
5 files changed, 4 insertions, 13 deletions
diff --git a/libavformat/aiff.c b/libavformat/aiff.c
index 8fa61948be..10eb1d1f4b 100644
--- a/libavformat/aiff.c
+++ b/libavformat/aiff.c
@@ -165,7 +165,6 @@ static int aiff_write_header(AVFormatContext *s)
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;
diff --git a/libavformat/asf-enc.c b/libavformat/asf-enc.c
index d12b52ad38..e87d5288f7 100644
--- a/libavformat/asf-enc.c
+++ b/libavformat/asf-enc.c
@@ -459,15 +459,11 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data
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);
}
diff --git a/libavformat/au.c b/libavformat/au.c
index 4bd8b1e253..6326de6f51 100644
--- a/libavformat/au.c
+++ b/libavformat/au.c
@@ -47,8 +47,6 @@ static const AVCodecTag codec_au_tags[] = {
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 */
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index e587967595..8fc36b9c96 100644
--- a/libavformat/flvenc.c
+++ b/libavformat/flvenc.c
@@ -145,7 +145,7 @@ static int flv_write_header(AVFormatContext *s)
}
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 @@ static int flv_write_header(AVFormatContext *s)
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 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
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;
diff --git a/libavformat/riff.c b/libavformat/riff.c
index 08371a3aeb..7a7f7cd0a6 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -296,8 +296,6 @@ int put_wav_header(ByteIOContext *pb, AVCodecContext *enc)
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 @@ void put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, const AVCodecTag *ta
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);