diff options
author | Kevin Mitchell <kevmitch@gmail.com> | 2014-11-17 03:28:41 -0800 |
---|---|---|
committer | Kevin Mitchell <kevmitch@gmail.com> | 2014-11-17 04:13:52 -0800 |
commit | f7c26230eb5ed3e3fc8517f069b1ef863aef8260 (patch) | |
tree | 077fef51f1fb5993ae99e73978d979c91147fd2f /audio/out | |
parent | 3da6f723c6ceba468412f2282ab4f7958ca6f5d7 (diff) | |
download | mpv-f7c26230eb5ed3e3fc8517f069b1ef863aef8260.tar.bz2 mpv-f7c26230eb5ed3e3fc8517f069b1ef863aef8260.tar.xz |
ao/wasapi: fix possible null dereference of pDevice
IMMDeviceEnumerator::GetDefaultAudioEndpoint may set pDevice to null on failure.
http://msdn.microsoft.com/en-us/library/windows/desktop/dd371401%28v=vs.85%29.aspx
Diffstat (limited to 'audio/out')
-rwxr-xr-x | audio/out/ao_wasapi_utils.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/audio/out/ao_wasapi_utils.c b/audio/out/ao_wasapi_utils.c index 69bbefe5ef..cf94220c4e 100755 --- a/audio/out/ao_wasapi_utils.c +++ b/audio/out/ao_wasapi_utils.c @@ -950,6 +950,7 @@ HRESULT wasapi_thread_init(struct ao *ao) eRender, eConsole, &state->pDevice); SAFE_RELEASE(pEnumerator, IMMDeviceEnumerator_Release(pEnumerator)); + EXIT_ON_ERROR(hr); char *id = get_device_id(state->pDevice); MP_VERBOSE(ao, "Default device ID: %s\n", id); |