changeset 1850:4d4e0ab8c667 libavformat

fix pcm u/s8 muxing
author bcoudurier
date Sun, 04 Mar 2007 01:56:27 +0000
parents acd6287f79e1
children 5535b52e5bd4
files movenc.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/movenc.c	Sun Mar 04 01:48:06 2007 +0000
+++ b/movenc.c	Sun Mar 04 01:56:27 2007 +0000
@@ -343,7 +343,11 @@
 
     if (track->mode == MODE_MOV) {
         put_be16(pb, track->enc->channels);
-        put_be16(pb, 16); /* FIXME 8 bit for 'raw ' in mov */
+        if (track->enc->codec_id == CODEC_ID_PCM_U8 ||
+            track->enc->codec_id == CODEC_ID_PCM_S8)
+            put_be16(pb, 8); /* bits per sample */
+        else
+            put_be16(pb, 16);
         put_be16(pb, track->audio_vbr ? -2 : 0); /* compression ID */
     } else { /* reserved for mp4/3gp */
         put_be16(pb, 2);