[MPlayer-cvslog] r28811 - trunk/libao2/ao_win32.c

reimar subversion at mplayerhq.hu
Thu Mar 5 13:25:11 CET 2009


Author: reimar
Date: Thu Mar  5 13:25:10 2009
New Revision: 28811

Log:
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.

Modified:
   trunk/libao2/ao_win32.c

Modified: trunk/libao2/ao_win32.c
==============================================================================
--- trunk/libao2/ao_win32.c	Thu Mar  5 08:00:45 2009	(r28810)
+++ trunk/libao2/ao_win32.c	Thu Mar  5 13:25:10 2009	(r28811)
@@ -88,8 +88,8 @@ static WAVEHDR*     waveBlocks;         
 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 = 



More information about the MPlayer-cvslog mailing list