mciavi: First check inputs, then (perhaps) stop and act.
This commit is contained in:
parent
403a820ed1
commit
a34831df13
|
@ -217,8 +217,6 @@ static DWORD MCIAVI_mciOpen(UINT wDevID, DWORD dwFlags,
|
|||
|
||||
TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpOpenParms);
|
||||
|
||||
MCIAVI_mciStop(wDevID, MCI_WAIT, NULL);
|
||||
|
||||
if (lpOpenParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
||||
|
||||
wma = (WINE_MCIAVI *)mciGetDriverData(wDevID);
|
||||
|
@ -300,8 +298,6 @@ DWORD MCIAVI_mciClose(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
|||
|
||||
TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpParms);
|
||||
|
||||
MCIAVI_mciStop(wDevID, MCI_WAIT, NULL);
|
||||
|
||||
wma = MCIAVI_mciGetOpenDev(wDevID);
|
||||
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
||||
|
||||
|
@ -676,13 +672,13 @@ static DWORD MCIAVI_mciSeek(UINT wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms
|
|||
|
||||
TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpParms);
|
||||
|
||||
MCIAVI_mciStop(wDevID, MCI_WAIT, NULL);
|
||||
|
||||
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
||||
|
||||
wma = MCIAVI_mciGetOpenDev(wDevID);
|
||||
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
||||
|
||||
MCIAVI_mciStop(wDevID, MCI_WAIT, NULL);
|
||||
|
||||
EnterCriticalSection(&wma->cs);
|
||||
|
||||
if (dwFlags & MCI_SEEK_TO_START) {
|
||||
|
@ -718,13 +714,13 @@ static DWORD MCIAVI_mciLoad(UINT wDevID, DWORD dwFlags, LPMCI_DGV_LOAD_PARMSW lp
|
|||
|
||||
FIXME("(%04x, %08x, %p) : stub\n", wDevID, dwFlags, lpParms);
|
||||
|
||||
MCIAVI_mciStop(wDevID, MCI_WAIT, NULL);
|
||||
|
||||
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
||||
|
||||
wma = MCIAVI_mciGetOpenDev(wDevID);
|
||||
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
||||
|
||||
MCIAVI_mciStop(wDevID, MCI_WAIT, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -737,8 +733,6 @@ static DWORD MCIAVI_mciRealize(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS l
|
|||
|
||||
FIXME("(%04x, %08x, %p) : stub\n", wDevID, dwFlags, lpParms);
|
||||
|
||||
MCIAVI_mciStop(wDevID, MCI_WAIT, NULL);
|
||||
|
||||
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
||||
|
||||
wma = MCIAVI_mciGetOpenDev(wDevID);
|
||||
|
@ -780,13 +774,13 @@ static DWORD MCIAVI_mciStep(UINT wDevID, DWORD dwFlags, LPMCI_DGV_STEP_PARMS lpP
|
|||
|
||||
FIXME("(%04x, %08x, %p) : stub\n", wDevID, dwFlags, lpParms);
|
||||
|
||||
MCIAVI_mciStop(wDevID, MCI_WAIT, NULL);
|
||||
|
||||
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
||||
|
||||
wma = MCIAVI_mciGetOpenDev(wDevID);
|
||||
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
|
||||
|
||||
MCIAVI_mciStop(wDevID, MCI_WAIT, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -799,8 +793,6 @@ static DWORD MCIAVI_mciCue(UINT wDevID, DWORD dwFlags, LPMCI_DGV_CUE_PARMS lpPar
|
|||
|
||||
FIXME("(%04x, %08x, %p) : stub\n", wDevID, dwFlags, lpParms);
|
||||
|
||||
MCIAVI_mciStop(wDevID, MCI_WAIT, NULL);
|
||||
|
||||
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
||||
|
||||
wma = MCIAVI_mciGetOpenDev(wDevID);
|
||||
|
@ -818,8 +810,6 @@ static DWORD MCIAVI_mciSetAudio(UINT wDevID, DWORD dwFlags, LPMCI_DGV_SETAUDIO_P
|
|||
|
||||
FIXME("(%04x, %08x, %p) : stub\n", wDevID, dwFlags, lpParms);
|
||||
|
||||
MCIAVI_mciStop(wDevID, MCI_WAIT, NULL);
|
||||
|
||||
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
||||
|
||||
wma = MCIAVI_mciGetOpenDev(wDevID);
|
||||
|
@ -837,8 +827,6 @@ static DWORD MCIAVI_mciSignal(UINT wDevID, DWORD dwFlags, LPMCI_DGV_SIGNAL_PARMS
|
|||
|
||||
FIXME("(%04x, %08x, %p) : stub\n", wDevID, dwFlags, lpParms);
|
||||
|
||||
MCIAVI_mciStop(wDevID, MCI_WAIT, NULL);
|
||||
|
||||
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
||||
|
||||
wma = MCIAVI_mciGetOpenDev(wDevID);
|
||||
|
@ -856,8 +844,6 @@ static DWORD MCIAVI_mciSetVideo(UINT wDevID, DWORD dwFlags, LPMCI_DGV_SETVIDEO_P
|
|||
|
||||
FIXME("(%04x, %08x, %p) : stub\n", wDevID, dwFlags, lpParms);
|
||||
|
||||
MCIAVI_mciStop(wDevID, MCI_WAIT, NULL);
|
||||
|
||||
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
||||
|
||||
wma = MCIAVI_mciGetOpenDev(wDevID);
|
||||
|
@ -875,8 +861,6 @@ static DWORD MCIAVI_mciConfigure(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS
|
|||
|
||||
FIXME("(%04x, %08x, %p) : stub\n", wDevID, dwFlags, lpParms);
|
||||
|
||||
MCIAVI_mciStop(wDevID, MCI_WAIT, NULL);
|
||||
|
||||
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
||||
|
||||
wma = MCIAVI_mciGetOpenDev(wDevID);
|
||||
|
|
Loading…
Reference in New Issue