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/wav.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/wav.c')
-rw-r--r-- | libavformat/wav.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libavformat/wav.c b/libavformat/wav.c index f8dd6c442e..df4203f067 100644 --- a/libavformat/wav.c +++ b/libavformat/wav.c @@ -38,13 +38,15 @@ const CodecTag codec_wav_tags[] = { /* returns the size or -1 on error */ int put_wav_header(ByteIOContext *pb, AVCodecContext *enc) { - int tag, bps, blkalign, bytespersec; + int bps, blkalign, bytespersec; int hdrsize = 18; - tag = codec_get_tag(codec_wav_tags, enc->codec_id); - if (tag == 0) + 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, tag); + + put_le16(pb, enc->codec_tag); put_le16(pb, enc->channels); put_le32(pb, enc->sample_rate); if (enc->codec_id == CODEC_ID_PCM_U8 || |