[Mplayer-cvslog] CVS: main/libao2 ao_oss.c,1.15,1.16

Stephen Davies steve at mplayer.dev.hu
Tue Dec 11 10:24:13 CET 2001


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

Modified Files:
	ao_oss.c 
Log Message:
limit get_space return <= MAX_OUTBURST, whilst always an exact number of fragments

Index: ao_oss.c
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/ao_oss.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- ao_oss.c	4 Dec 2001 17:54:08 -0000	1.15
+++ ao_oss.c	11 Dec 2001 09:23:57 -0000	1.16
@@ -241,7 +241,10 @@
 #ifdef SNDCTL_DSP_GETOSPACE
   if(ioctl(audio_fd, SNDCTL_DSP_GETOSPACE, &zz)!=-1){
       // calculate exact buffer space:
-      return zz.fragments*zz.fragsize;
+      playsize = zz.fragments*zz.fragsize;
+      if (playsize > MAX_OUTBURST)
+	playsize = (MAX_OUTBURST / zz.fragsize) * zz.fragsize;
+      return playsize;
   }
 #endif
 




More information about the MPlayer-cvslog mailing list