From 534571f7940a7c7a125ef66fd2075be71a283058 Mon Sep 17 00:00:00 2001 From: Kevin Mitchell Date: Fri, 26 Feb 2016 10:44:55 -0800 Subject: [PATCH] ao_wasapi: use MP_FATAL for stuff that leads to init failure --- audio/out/ao_wasapi.c | 8 ++++---- audio/out/ao_wasapi_utils.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/audio/out/ao_wasapi.c b/audio/out/ao_wasapi.c index f472c7eeb6..c667ab878e 100644 --- a/audio/out/ao_wasapi.c +++ b/audio/out/ao_wasapi.c @@ -287,7 +287,7 @@ static int init(struct ao *ao) state->hInitDone = CreateEventW(NULL, FALSE, FALSE, NULL); state->hWake = CreateEventW(NULL, FALSE, FALSE, NULL); if (!state->hInitDone || !state->hWake) { - MP_ERR(ao, "Error creating events\n"); + MP_FATAL(ao, "Error creating events\n"); uninit(ao); return -1; } @@ -298,7 +298,7 @@ static int init(struct ao *ao) state->init_ret = E_FAIL; state->hAudioThread = CreateThread(NULL, 0, &AudioThread, ao, 0, NULL); if (!state->hAudioThread) { - MP_ERR(ao, "Failed to create audio thread\n"); + MP_FATAL(ao, "Failed to create audio thread\n"); uninit(ao); return -1; } @@ -307,7 +307,7 @@ static int init(struct ao *ao) SAFE_RELEASE(state->hInitDone,CloseHandle(state->hInitDone)); if (FAILED(state->init_ret)) { if (!ao->probing) - MP_ERR(ao, "Received failure from audio thread\n"); + MP_FATAL(ao, "Received failure from audio thread\n"); uninit(ao); return -1; } @@ -481,7 +481,7 @@ static int hotplug_init(struct ao *ao) return 0; exit_label: - MP_ERR(state, "Error setting up audio hotplug: %s\n", mp_HRESULT_to_str(hr)); + MP_FATAL(state, "Error setting up audio hotplug: %s\n", mp_HRESULT_to_str(hr)); hotplug_uninit(ao); return -1; } diff --git a/audio/out/ao_wasapi_utils.c b/audio/out/ao_wasapi_utils.c index 76a50cdf24..8d0ea30bd7 100644 --- a/audio/out/ao_wasapi_utils.c +++ b/audio/out/ao_wasapi_utils.c @@ -978,7 +978,7 @@ retry: ; MP_DBG(ao, "Init wasapi thread done\n"); return S_OK; exit_label: - MP_ERR(state, "Error setting up audio thread: %s\n", mp_HRESULT_to_str(hr)); + MP_FATAL(state, "Error setting up audio thread: %s\n", mp_HRESULT_to_str(hr)); return hr; }