changeset 12149:2cce4d42f4a8

support for abitrary imaadpcm encoding, ported from ffmpeg
author alex
date Wed, 07 Apr 2004 12:46:14 +0000
parents 62d569821d5d
children 2c9a2b1772bc
files mencoder.c
diffstat 1 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mencoder.c	Tue Apr 06 20:06:57 2004 +0000
+++ b/mencoder.c	Wed Apr 07 12:46:14 2004 +0000
@@ -928,12 +928,8 @@
     case 0x11: /* imaadpcm */
 	mux_a->wf->wBitsPerSample = 4;
 	mux_a->wf->cbSize = 2;
-	/*
-	 * Magic imaadpcm values, currently probably only valid
-	 * for 48KHz Stereo
-	 */
-	((unsigned char*)mux_a->wf)[sizeof(WAVEFORMATEX)] = 0xf9;
-	((unsigned char*)mux_a->wf)[sizeof(WAVEFORMATEX)+1] = 0x07;
+	((uint16_t*)mux_a->wf)[sizeof(WAVEFORMATEX)] = 
+	    ((lavc_actx->block_align - 4 * lavc_actx->channels) / (4 * lavc_actx->channels)) * 8 + 1;
 	break;
     case 0x55: /* mp3 */
 	mux_a->wf->cbSize = 12;