Mercurial > libavformat.hg
diff au.c @ 196:01bec1059bdf libavformat
use codec_tag for encoding too
| author | michaelni |
|---|---|
| date | Mon, 18 Aug 2003 09:20:02 +0000 |
| parents | 2fa5e94ba716 |
| children | 3d92f793fd67 |
line wrap: on
line diff
--- a/au.c Tue Aug 12 18:20:29 2003 +0000 +++ b/au.c Mon Aug 18 09:20:02 2003 +0000 @@ -42,15 +42,14 @@ /* 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;
