Fixed deadlock when stopping playback.

This commit is contained in:
Christian Costa 2004-03-16 01:13:52 +00:00 committed by Alexandre Julliard
parent 85cbe8213b
commit 4bbeb429c8
1 changed files with 4 additions and 0 deletions

View File

@ -609,7 +609,11 @@ static DWORD MCIAVI_mciStop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpPa
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 */