0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 20:03:10 +02:00

audio/out: fix initialization failure with win32

mp_make_wakeup_pipe() always fails on win32. If this call fails on Linux
(and e.g. ao_alsa is used), this will probably burn CPU since poll()
won't work on the invalid file descriptor, but whatever, the failure
case is obscure enough.
This commit is contained in:
wm4 2014-07-26 20:26:27 +02:00
parent ef600041ba
commit ac62244983

View File

@ -364,8 +364,7 @@ static int init(struct ao *ao)
pthread_mutex_init(&p->lock, NULL); pthread_mutex_init(&p->lock, NULL);
pthread_cond_init(&p->wakeup, NULL); pthread_cond_init(&p->wakeup, NULL);
pthread_cond_init(&p->wakeup_drain, NULL); pthread_cond_init(&p->wakeup_drain, NULL);
if (mp_make_wakeup_pipe(p->wakeup_pipe) < 0) mp_make_wakeup_pipe(p->wakeup_pipe);
goto err;
p->buffer = mp_audio_buffer_create(ao); p->buffer = mp_audio_buffer_create(ao);
mp_audio_buffer_reinit_fmt(p->buffer, ao->format, mp_audio_buffer_reinit_fmt(p->buffer, ao->format,