changeset 505:e996e7da971c libavformat

AAC in mov/mp4 patch by (Gildas Bazin <gbazin at altern dot org>)
author michael
date Wed, 28 Jul 2004 09:40:59 +0000
parents cb0b5994f3e0
children 74ad3aa6749c
files movenc.c
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/movenc.c	Tue Jul 27 17:58:47 2004 +0000
+++ b/movenc.c	Wed Jul 28 09:40:59 2004 +0000
@@ -282,7 +282,16 @@
     /* 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 */