[MCIAVI] Fix deadlock when stopping playback
Christian Costa
titan.costa at wanadoo.fr
Mon Mar 15 13:16:09 CST 2004
Hi,
Changelog :
Fixed deadlock when stopping playback.
Christian Costa titan.costa at wanadoo.fr
-------------- next part --------------
Index: mciavi.c
===================================================================
RCS file: /home/wine/wine/dlls/winmm/mciavi/mciavi.c,v
retrieving revision 1.23
diff -u -r1.23 mciavi.c
--- mciavi.c 1 Mar 2004 23:38:25 -0000 1.23
+++ mciavi.c 15 Mar 2004 18:09:04 -0000
@@ -609,7 +609,11 @@
SetEvent(wma->hStopEvent);
/* fall through */
case MCI_MODE_PAUSE:
+ /* Since our wave notification callback takes the lock,
+ * we must release it before resetting the device */
+ LeaveCriticalSection(&wma->cs);
dwRet = waveOutReset(wma->hWave);
+ EnterCriticalSection(&wma->cs);
/* fall through */
default:
do /* one more chance for an async thread to finish */
More information about the wine-patches
mailing list