more descriptive error messages for mpd
git-svn-id: https://svn.musicpd.org/mpd/trunk@2514 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
c104801a67
commit
14c6150fd9
@ -242,10 +242,30 @@ int ogg_decode(OutputBuffer * cb, DecoderControl * dc, InputStream * inStream)
|
|||||||
callbacks.close_func = ogg_close_cb;
|
callbacks.close_func = ogg_close_cb;
|
||||||
callbacks.tell_func = ogg_tell_cb;
|
callbacks.tell_func = ogg_tell_cb;
|
||||||
|
|
||||||
if(ov_open_callbacks(&data, &vf, NULL, 0, callbacks) < 0) {
|
if((ret = ov_open_callbacks(&data, &vf, NULL, 0, callbacks)) < 0) {
|
||||||
closeInputStream(inStream);
|
closeInputStream(inStream);
|
||||||
if(!dc->stop) {
|
if(!dc->stop) {
|
||||||
ERROR("Input does not appear to be an Ogg Vorbis stream.\n");
|
ERROR("Error decoding Ogg Vorbis stream: ");
|
||||||
|
switch(ret) {
|
||||||
|
case OV_EREAD:
|
||||||
|
ERROR("read error\n");
|
||||||
|
break;
|
||||||
|
case OV_ENOTVORBIS:
|
||||||
|
ERROR("not vorbis stream\n");
|
||||||
|
break;
|
||||||
|
case OV_EVERSION:
|
||||||
|
ERROR("vorbis version mismatch\n");
|
||||||
|
break;
|
||||||
|
case OV_EBADHEADER:
|
||||||
|
ERROR("invalid vorbis header\n");
|
||||||
|
break;
|
||||||
|
case OV_EFAULT:
|
||||||
|
ERROR("internal logic error\n");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
ERROR("unknown error\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user