aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins/ogg_plugin.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-11-05 05:12:58 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-11-05 05:12:58 +0000
commit14c6150fd995ca4bb0a3a4415d9d1bbdf3bdc7c8 (patch)
tree2575d0ffb0c752bb2463ae47354e77a3dcc7617e /src/inputPlugins/ogg_plugin.c
parentc104801a67b298ac999b72f9fc671d78f0504f4d (diff)
downloadmpd-14c6150fd995ca4bb0a3a4415d9d1bbdf3bdc7c8.tar.gz
mpd-14c6150fd995ca4bb0a3a4415d9d1bbdf3bdc7c8.tar.xz
mpd-14c6150fd995ca4bb0a3a4415d9d1bbdf3bdc7c8.zip
more descriptive error messages for mpd
git-svn-id: https://svn.musicpd.org/mpd/trunk@2514 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/inputPlugins/ogg_plugin.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/src/inputPlugins/ogg_plugin.c b/src/inputPlugins/ogg_plugin.c
index da08cb2e2..d6add6d3a 100644
--- a/src/inputPlugins/ogg_plugin.c
+++ b/src/inputPlugins/ogg_plugin.c
@@ -242,10 +242,30 @@ int ogg_decode(OutputBuffer * cb, DecoderControl * dc, InputStream * inStream)
callbacks.close_func = ogg_close_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);
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;
}
else {