[MPlayer-users] wav header fixup broken

Olivier Galibert galibert at pobox.com
Tue Feb 4 17:04:40 CET 2003


The "initialize wav header with infinite lenght" broke the
post-recording fixup by changing the initialisation value of
data_length.  This fixes it.

  OG.

Index: ao_pcm.c
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/ao_pcm.c,v
retrieving revision 1.15
diff -u -r1.15 ao_pcm.c
--- ao_pcm.c	2 Feb 2003 16:34:54 -0000	1.15
+++ ao_pcm.c	4 Feb 2003 16:09:45 -0000
@@ -118,8 +118,10 @@
 
 	fp = fopen(ao_outputfilename, "wb");
 	if(fp) {
-		if(ao_pcm_waveheader) /* Reserve space for wave header */
+		if(ao_pcm_waveheader) { /* Reserve space for wave header */
 			fwrite(&wavhdr,sizeof(wavhdr),1,fp);
+			wavhdr.data_length = 0;
+		}
 		return 1;
 	}
 	printf("PCM: Failed to open %s for writing!\n", ao_outputfilename);



More information about the MPlayer-users mailing list