summaryrefslogtreecommitdiffstats
path: root/libao2
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-11-06 22:33:17 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-11-06 22:33:17 +0000
commit2f4593d56b254156ee8b85649d9ae8cc2f8632d3 (patch)
tree44813edbde0eec2834d18f48f17bc3958c82143b /libao2
parent667f16b1e2eb1937e17bdc624efffa2bc3fbe380 (diff)
downloadmpv-2f4593d56b254156ee8b85649d9ae8cc2f8632d3.tar.bz2
mpv-2f4593d56b254156ee8b85649d9ae8cc2f8632d3.tar.xz
respect immed uninit flag, initialize ao_data.outburst.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13888 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libao2')
-rw-r--r--libao2/ao_sdl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libao2/ao_sdl.c b/libao2/ao_sdl.c
index a76b020f12..f21403d0db 100644
--- a/libao2/ao_sdl.c
+++ b/libao2/ao_sdl.c
@@ -280,6 +280,7 @@ void callback(void *userdata, Uint8 *stream, int len); userdata is the pointer s
mp_msg(MSGT_AO,MSGL_V,"SDL: buf size = %d\n",obtained.size);
ao_data.buffersize=obtained.size;
+ ao_data.outburst = CHUNK_SIZE;
reset();
/* unsilence audio, if callback is ready */
@@ -291,6 +292,7 @@ void callback(void *userdata, Uint8 *stream, int len); userdata is the pointer s
// close audio device
static void uninit(int immed){
mp_msg(MSGT_AO,MSGL_V,"SDL: Audio Subsystem shutting down!\n");
+ if (!immed)
while(buf_free() < BUFFSIZE - CHUNK_SIZE)
usec_sleep(50000);
SDL_CloseAudio();