summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorGildas Bazin <gbazi@altern.org>2004-07-28 09:40:59 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-07-28 09:40:59 +0000
commitef19c7eb3f7710fb5e2b9132f611d096c1baae4b (patch)
treed1068b40d077a6649f77932ad9daa35af7eec9f5 /libavformat
parente6cf9be59b61e9dccf14563beaecf63bfbd853cb (diff)
AAC in mov/mp4 patch by (Gildas Bazin <gbazin at altern dot org>)
Originally committed as revision 3359 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/movenc.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 9c6783ea62..3e4412d7f8 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -282,7 +282,16 @@ static int mov_write_audio_tag(ByteIOContext *pb, MOVTrack* track)
/* TODO: Currently hard-coded to 16-bit, there doesn't seem
to be a good way to get number of bits of audio */
put_be16(pb, 0x10); /* Reserved */
- put_be16(pb, 0); /* compression ID (= 0) */
+
+ if(track->enc->codec_id == CODEC_ID_AAC ||
+ track->enc->codec_id == CODEC_ID_MP3)
+ {
+ put_be16(pb, 0xfffe); /* compression ID (vbr)*/
+ }
+ else
+ {
+ put_be16(pb, 0); /* compression ID (= 0) */
+ }
put_be16(pb, 0); /* packet size (= 0) */
put_be16(pb, track->timescale); /* Time scale */
put_be16(pb, 0); /* Reserved */