diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-03-05 22:07:06 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-03-05 22:07:06 +0000 |
commit | 2f2b27164906d25949c3db504d3f312118c1c431 (patch) | |
tree | 98854ca9d16a81f70f7d2da4dd50825abd920e77 /libao2 | |
parent | 3e40788623311c9b917116a80eb3c9f3d0d9c03c (diff) |
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
Diffstat (limited to 'libao2')
-rw-r--r-- | libao2/ao_win32.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libao2/ao_win32.c b/libao2/ao_win32.c index 11883a92e4..93622b944b 100644 --- a/libao2/ao_win32.c +++ b/libao2/ao_win32.c @@ -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); |