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.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28828 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2009-03-05 22:07:06 +00:00
parent 3e40788623
commit 2f2b271649
1 changed files with 2 additions and 1 deletions

View File

@ -251,7 +251,8 @@ static int init(int rate,int channels,int format,int flags)
// 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);