Avoid a possible deadlock when stopping playback
Dmitry Timoshkov
dmitry at baikal.ru
Tue Mar 16 07:35:55 CST 2004
Hello,
looks like it's a good idea to do the same when signalling hStopEvent.
Changelog:
Dmitry Timoshkov <dmitry at codeweavers.com>
Avoid a possible deadlock when stopping playback.
--- cvs/hq/wine/dlls/winmm/mciavi/mciavi.c 2004-03-16 18:37:03.000000000 +0800
+++ wine/dlls/winmm/mciavi/mciavi.c 2004-03-16 19:38:42.000000000 +0800
@@ -606,7 +606,9 @@ static DWORD MCIAVI_mciStop(UINT wDevID,
switch (wma->dwStatus) {
case MCI_MODE_PLAY:
case MCI_MODE_RECORD:
+ LeaveCriticalSection(&wma->cs);
SetEvent(wma->hStopEvent);
+ EnterCriticalSection(&wma->cs);
/* fall through */
case MCI_MODE_PAUSE:
/* Since our wave notification callback takes the lock,
More information about the wine-patches
mailing list