[MPlayer-cvslog] r28828 - trunk/libao2/ao_win32.c

reimar subversion at mplayerhq.hu
Thu Mar 5 23:07:06 CET 2009


Author: reimar
Date: Thu Mar  5 23:07:06 2009
New Revision: 28828

Log:
Sleep based on get_delay in ao_win32 uninit instead of a loop.
The loop for an unknown reason could rarely cause an endless loop.

Modified:
   trunk/libao2/ao_win32.c

Modified: trunk/libao2/ao_win32.c
==============================================================================
--- trunk/libao2/ao_win32.c	Thu Mar  5 22:27:05 2009	(r28827)
+++ trunk/libao2/ao_win32.c	Thu Mar  5 23:07:06 2009	(r28828)
@@ -251,7 +251,8 @@ static int init(int rate,int channels,in
 // close audio device
 static void uninit(int immed)
 {
-    if(!immed)while(buffered_bytes > 0)usec_sleep(50000);
+    if(!immed)
+	usec_sleep(get_delay() * 1000 * 1000);
     else buffered_bytes=0;
 	waveOutReset(hWaveOut);
 	waveOutClose(hWaveOut);



More information about the MPlayer-cvslog mailing list