From c570aa20faf7d0b747e8509390dc8580f91581d4 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 25 Nov 2008 16:18:06 +0100 Subject: [PATCH] ao: print error message when ao_open_live() fails When ao_open_live() failed, MPD would ignore the error code in "errno". Make it print a meaningful error message. --- src/output/ao_plugin.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/output/ao_plugin.c b/src/output/ao_plugin.c index b3819a1d8..3907448ae 100644 --- a/src/output/ao_plugin.c +++ b/src/output/ao_plugin.c @@ -208,8 +208,10 @@ audioOutputAo_openDevice(void *data, struct audio_format *audio_format) ad->device = ao_open_live(ad->driverId, &format, ad->options); - if (ad->device == NULL) + if (ad->device == NULL) { + audioOutputAo_error("Failed to open libao"); return false; + } return true; }