mirror of
https://github.com/mpv-player/mpv
synced 2025-02-03 05:31:34 +00:00
ringbuffer variable intialization fix for multifile playback patch by Rune Petersen <rune.mail-list at mail.tele.dk>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13736 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
2c0e791eb0
commit
412b37082f
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user