mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-21 19:14:09 +00:00
winepulse: Fix crash when requesting exclusive mode with an unsupported format.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55362
This commit is contained in:
parent
797a8bb192
commit
31e5218286
|
@ -2221,9 +2221,14 @@ static NTSTATUS pulse_is_format_supported(void *args)
|
|||
break;
|
||||
}
|
||||
|
||||
/* This driver does not support exclusive mode. */
|
||||
if (exclusive && params->result == S_OK)
|
||||
params->result = params->flow == eCapture ? AUDCLNT_E_UNSUPPORTED_FORMAT : AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED;
|
||||
if (exclusive) { /* This driver does not support exclusive mode. */
|
||||
if (params->result == S_OK)
|
||||
params->result = params->flow == eCapture ?
|
||||
AUDCLNT_E_UNSUPPORTED_FORMAT :
|
||||
AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED;
|
||||
else if (params->result == S_FALSE)
|
||||
params->result = AUDCLNT_E_UNSUPPORTED_FORMAT;
|
||||
}
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue