[MPlayer-dev-eng] [PATCH] fix wav header bug: block_align on libao2/ao_pcm.c

lists at pedro.larroy.com lists at pedro.larroy.com
Wed Aug 17 13:06:49 CEST 2005


Hi, I sent this patch two weeks ago and has been ignored, is not going
to be applied?  Fixes a bug in the block_align in the pcm header.

References:
http://www.sonicspot.com/guide/wavefiles.html
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/DirectX/htm/writingtoawavfile.asp

Regards.
-- 
Pedro Larroy Tovar, pedro at larroy dot com 
Make debian mirrors with debian-multimirror: http://pedro.larroy.com/deb_mm/
   * Las patentes de programación son nocivas para la innovación * 
                 http://proinnova.hispalinux.es/
-------------- next part --------------
Index: libao2/ao_pcm.c
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/ao_pcm.c,v
retrieving revision 1.29
diff -u -r1.29 ao_pcm.c
--- libao2/ao_pcm.c	19 Jan 2005 17:18:25 -0000	1.29
+++ libao2/ao_pcm.c	9 Aug 2005 13:14:31 -0000
@@ -120,7 +120,7 @@
 	wavhdr.sample_rate = le2me_32(ao_data.samplerate);
 	wavhdr.bytes_per_second = le2me_32(ao_data.bps);
 	wavhdr.bits = le2me_16(bits);
-	
+	wavhdr.block_align = le2me_16(ao_data.channels*(bits/8));
 	wavhdr.data_length=le2me_32(0x7ffff000);
 	wavhdr.file_length = wavhdr.data_length + sizeof(wavhdr) - 8;
 


More information about the MPlayer-dev-eng mailing list