[Ffmpeg-cvslog] r8212 - trunk/libavformat/movenc.c

bcoudurier subversion
Sun Mar 4 02:48:06 CET 2007


Author: bcoudurier
Date: Sun Mar  4 02:48:06 2007
New Revision: 8212

Modified:
   trunk/libavformat/movenc.c

Log:
deobfuscate, clearly split mov case

Modified: trunk/libavformat/movenc.c
==============================================================================
--- trunk/libavformat/movenc.c	(original)
+++ trunk/libavformat/movenc.c	Sun Mar  4 02:48:06 2007
@@ -341,11 +341,16 @@ static int mov_write_audio_tag(ByteIOCon
     put_be16(pb, 0); /* Revision level */
     put_be32(pb, 0); /* Reserved */
 
-    put_be16(pb, track->mode == MODE_MOV ? track->enc->channels : 2); /* Number of channels */
-    /* FIXME 8 bit for 'raw ' in mov */
-    put_be16(pb, 16); /* Reserved */
+    if (track->mode == MODE_MOV) {
+        put_be16(pb, track->enc->channels);
+        put_be16(pb, 16); /* FIXME 8 bit for 'raw ' in mov */
+        put_be16(pb, track->audio_vbr ? -2 : 0); /* compression ID */
+    } else { /* reserved for mp4/3gp */
+        put_be16(pb, 2);
+        put_be16(pb, 16);
+        put_be16(pb, 0);
+    }
 
-    put_be16(pb, track->mode == MODE_MOV && track->audio_vbr ? -2 : 0); /* compression ID */
     put_be16(pb, 0); /* packet size (= 0) */
     put_be16(pb, track->timescale); /* Time scale */
     put_be16(pb, 0); /* Reserved */




More information about the ffmpeg-cvslog mailing list