[Mplayer-cvslog] CVS: main/libao2 ao_pcm.c,1.4,1.5

Arpi of Ize arpi at mplayer.dev.hu
Sat Mar 2 19:55:00 CET 2002


Update of /cvsroot/mplayer/main/libao2
In directory mplayer:/var/tmp.root/cvs-serv25041

Modified Files:
	ao_pcm.c 
Log Message:
good-looking fix by Tobias Diedrich <td at informatik.uni-hannover.de>

Index: ao_pcm.c
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/ao_pcm.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ao_pcm.c	24 Nov 2001 05:21:22 -0000	1.4
+++ ao_pcm.c	2 Mar 2002 18:54:58 -0000	1.5
@@ -14,6 +14,8 @@
 
 LIBAO_EXTERN(pcm)
 
+extern int vo_pts;
+
 char *ao_outputfilename = NULL;
 int ao_pcm_waveheader = 1;
 
@@ -82,7 +84,7 @@
 	printf("PCM: Info - to write WAVE files use -waveheader (default), for RAW PCM -nowaveheader.\n");
 	fp = fopen(ao_outputfilename, "wb");
 
-	ao_data.outburst = 4096;
+	ao_data.outburst = 65536;
 
 
 	if(fp) {
@@ -98,7 +100,7 @@
 static void uninit(){
 	
 	if(ao_pcm_waveheader){ /* Write wave header */
-		wavhdr.file_length = wavhdr.data_length + sizeof(wavhdr);
+		wavhdr.file_length = wavhdr.data_length + sizeof(wavhdr) - 8;
 		fseek(fp, 0, SEEK_SET);
 		fwrite(&wavhdr,sizeof(wavhdr),1,fp);
 	}
@@ -126,7 +128,7 @@
 // return: how many bytes can be played without blocking
 static int get_space(){
 
-    return ao_data.outburst;
+    return ao_data.pts < vo_pts ? ao_data.outburst : 0;
 }
 
 // plays 'len' bytes of 'data'




More information about the MPlayer-cvslog mailing list