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.
This commit is contained in:
parent
423276a384
commit
c570aa20fa
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user