From 8831008bb5d6d2e36b5e577043a77a801814aac1 Mon Sep 17 00:00:00 2001 From: reimar Date: Thu, 5 Mar 2009 12:25:10 +0000 Subject: [PATCH] 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 --- libao2/ao_win32.c | 4 ++-- 1 file 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 = -- 2.11.4.GIT