mirror of https://github.com/mpv-player/mpv
ao_wasapi: handle S_FALSE in mp_format_res_str
IsFormatSupported may return S_FALSE (considered SUCCESS) if the requested format is not suppported, but is close to one that is.
This commit is contained in:
parent
433c9a90a5
commit
609d0ef478
|
@ -299,8 +299,9 @@ static bool set_ao_format(struct ao *ao, WAVEFORMATEX *wf,
|
|||
}
|
||||
|
||||
#define mp_format_res_str(hres) \
|
||||
(SUCCEEDED(hres) ? "ok" : ((hres) == AUDCLNT_E_UNSUPPORTED_FORMAT) \
|
||||
? "unsupported" : mp_HRESULT_to_str(hres))
|
||||
(SUCCEEDED(hres) ? ((hres) == S_OK) ? "ok" : "close" \
|
||||
: ((hres) == AUDCLNT_E_UNSUPPORTED_FORMAT) \
|
||||
? "unsupported" : mp_HRESULT_to_str(hres))
|
||||
|
||||
static bool try_format_exclusive(struct ao *ao, WAVEFORMATEXTENSIBLE *wformat)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue