diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-08-18 09:20:02 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-08-18 09:20:02 +0000 |
commit | bd5a60201e0fc253d55cef919a6d69de6efcbd1a (patch) | |
tree | 0486ceb8fe35878801d283c80da1e360e8e1bb29 /libavformat/au.c | |
parent | f8188626331ba132abc7b11aadb15eaac09ac7aa (diff) | |
download | ffmpeg-bd5a60201e0fc253d55cef919a6d69de6efcbd1a.tar.gz |
use codec_tag for encoding too
Originally committed as revision 2125 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/au.c')
-rw-r--r-- | libavformat/au.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libavformat/au.c b/libavformat/au.c index 4a8353c444..b560437d51 100644 --- a/libavformat/au.c +++ b/libavformat/au.c @@ -42,15 +42,14 @@ static const CodecTag codec_au_tags[] = { /* AUDIO_FILE header */ static int put_au_header(ByteIOContext *pb, AVCodecContext *enc) { - int tag; - - tag = codec_get_tag(codec_au_tags, enc->codec_id); - if (tag == 0) + 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 */ put_be32(pb, AU_UNKOWN_SIZE); /* data size */ - put_be32(pb, (uint32_t)tag); /* codec ID */ + put_be32(pb, (uint32_t)enc->codec_tag); /* codec ID */ put_be32(pb, enc->sample_rate); put_be32(pb, (uint32_t)enc->channels); return 0; |