From 412b37082f74fb5bd44fee062f48d280627edbcd Mon Sep 17 00:00:00 2001 From: faust3 Date: Fri, 22 Oct 2004 12:43:34 +0000 Subject: [PATCH] ringbuffer variable intialization fix for multifile playback patch by Rune Petersen git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13736 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libao2/ao_win32.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libao2/ao_win32.c b/libao2/ao_win32.c index 0b97417fb7..edafdc59ec 100644 --- a/libao2/ao_win32.c +++ b/libao2/ao_win32.c @@ -166,7 +166,7 @@ static int init(int rate,int channels,int format,int flags) //fill waveformatex ZeroMemory( &wformat, sizeof(WAVEFORMATEXTENSIBLE)); - wformat.Format.cbSize = (channels>2)?sizeof(WAVEFORMATEXTENSIBLE):0; + wformat.Format.cbSize = (channels>2)?sizeof(WAVEFORMATEXTENSIBLE)-sizeof(WAVEFORMATEX):0; wformat.Format.nChannels = channels; wformat.Format.nSamplesPerSec = rate; if(format == AFMT_AC3) @@ -222,6 +222,10 @@ static int init(int rate,int channels,int format,int flags) waveBlocks[i].lpData = buffer; buffer += BUFFER_SIZE; } + buf_write=0; + buf_write_pos=0; + full_buffers=0; + buffered_bytes=0; return 1; }