diff options
author | Diogo Franco (Kovensky) <diogomfranco@gmail.com> | 2013-07-19 23:57:58 -0300 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-07-22 02:42:37 +0200 |
commit | d9a13585050172aade10e49febdd987b5ceda824 (patch) | |
tree | 9c897ee397b9ffc6c01e75eafaf9bf8ad94acae0 /audio/out | |
parent | 4cf1fc678f24319be2f1a4a6c3554d60d25824df (diff) | |
download | mpv-d9a13585050172aade10e49febdd987b5ceda824.tar.bz2 mpv-d9a13585050172aade10e49febdd987b5ceda824.tar.xz |
ao_wasapi0: Don't complain about failed init during AO probing
Only if the user specifically asked for ao_wasapi0.
Diffstat (limited to 'audio/out')
-rw-r--r-- | audio/out/ao_wasapi0.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/audio/out/ao_wasapi0.c b/audio/out/ao_wasapi0.c index c08370f350..5c161cea4b 100644 --- a/audio/out/ao_wasapi0.c +++ b/audio/out/ao_wasapi0.c @@ -746,7 +746,7 @@ static int thread_init(struct ao *ao) if (*end != '\0' || devno < 0) { mp_msg(MSGT_AO, MSGL_ERR, "ao-wasapi: invalid device number %s!", state->opt_device); - goto exit_nolog; + goto exit_label; } } hr = find_and_load_device(state, devno, devid); @@ -775,10 +775,6 @@ static int thread_init(struct ao *ao) return state->init_ret; } exit_label: - EnterCriticalSection(&state->print_lock); - mp_msg(MSGT_AO, MSGL_ERR, "ao-wasapi: thread_init failed!\n"); - LeaveCriticalSection(&state->print_lock); -exit_nolog: state->init_ret = -1; SetEvent(state->init_done); return -1; @@ -1084,9 +1080,15 @@ static int init(struct ao *ao, char *params) return -1; } WaitForSingleObject(state->init_done, INFINITE); /* wait on init complete */ - mp_msg(MSGT_AO, MSGL_V, "ao-wasapi0: Init Done!\n"); - if (setup_buffers(state)) - mp_msg(MSGT_AO, MSGL_ERR, "ao-wasapi0: buffer setup failed!\n"); + if (state->init_ret) { + if (!ao->probing) { + mp_msg(MSGT_AO, MSGL_ERR, "ao-wasapi: thread_init failed!\n"); + } + } else { + mp_msg(MSGT_AO, MSGL_V, "ao-wasapi0: Init Done!\n"); + if (setup_buffers(state)) + mp_msg(MSGT_AO, MSGL_ERR, "ao-wasapi0: buffer setup failed!\n"); + } return state->init_ret; } |