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

Arpi of Ize arpi at mplayer.dev.hu
Thu Jan 24 01:53:25 CET 2002


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

Modified Files:
	ao_mpegpes.c 
Log Message:
freq fix, removed muxer delay

Index: ao_mpegpes.c
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/ao_mpegpes.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ao_mpegpes.c	22 Jan 2002 18:11:27 -0000	1.4
+++ ao_mpegpes.c	24 Jan 2002 00:53:22 -0000	1.5
@@ -22,7 +22,7 @@
     return -1;
 }
 
-
+static int freq=0;
 static int freq_id=0;
 
 // open & setup audio device
@@ -31,6 +31,7 @@
 
     ao_data.outburst=2000;
     ao_data.format=format;
+freq=rate;
     
     switch(rate){
 	case 48000:	freq_id=0;break;
@@ -73,11 +74,11 @@
 
 // return: how many bytes can be played without blocking
 static int get_space(){
-    float x=(float)(vo_pts-ao_data.pts)/90000.0-0.5;
+    float x=(float)(vo_pts-ao_data.pts)/90000.0;
     int y;
     if(x<=0) return 0;
-    y=48000*4*x;y/=ao_data.outburst;y*=ao_data.outburst;
-//    if(y>2000) y=2000;
+    y=freq*4*x;y/=ao_data.outburst;y*=ao_data.outburst;
+    if(y>32000) y=32000;
 //    printf("diff: %5.3f -> %d  \n",x,y);
     return y;
 }




More information about the MPlayer-cvslog mailing list