diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-03-05 12:25:10 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-03-05 12:25:10 +0000 |
commit | 8831008bb5d6d2e36b5e577043a77a801814aac1 (patch) | |
tree | b2d2d50944658fcb4d92e8e708ce19932f0417e7 /libao2 | |
parent | 3b0f23d1cfa33596e554e1d3662db3daa6f02b46 (diff) | |
download | mpv-8831008bb5d6d2e36b5e577043a77a801814aac1.tar.bz2 mpv-8831008bb5d6d2e36b5e577043a77a801814aac1.tar.xz |
full_buffers and buffered_bytes must be volatile because they are used from
different threads, hopefully this fixes an uninit hang.
The code still relies on luck for thread-safety though.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28811 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libao2')
-rw-r--r-- | libao2/ao_win32.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libao2/ao_win32.c b/libao2/ao_win32.c index 40830eb233..11883a92e4 100644 --- a/libao2/ao_win32.c +++ b/libao2/ao_win32.c @@ -88,8 +88,8 @@ static WAVEHDR* waveBlocks; //pointer to our ringbuffer memory static HWAVEOUT hWaveOut; //handle to the waveout device static unsigned int buf_write=0; static unsigned int buf_write_pos=0; -static int full_buffers=0; -static int buffered_bytes=0; +static volatile int full_buffers=0; +static volatile int buffered_bytes=0; static ao_info_t info = |