diff options
author | J. Alexander Treuman <jat@spatialrift.net> | 2006-07-19 15:58:11 +0000 |
---|---|---|
committer | J. Alexander Treuman <jat@spatialrift.net> | 2006-07-19 15:58:11 +0000 |
commit | 649a037e8d9639ddf8fa6bd3570b5ed8beb7a949 (patch) | |
tree | 097f74ef29e88d24a5e9409accfd4313c948d153 /src | |
parent | 9f6364af45c2efb868c0318aff78be913bcc4869 (diff) | |
download | mpd-649a037e8d9639ddf8fa6bd3570b5ed8beb7a949.tar.gz mpd-649a037e8d9639ddf8fa6bd3570b5ed8beb7a949.tar.xz mpd-649a037e8d9639ddf8fa6bd3570b5ed8beb7a949.zip |
Use ERROR only once for our ogg vorbis errors, so we don't get a timestamp mid line
git-svn-id: https://svn.musicpd.org/mpd/trunk@4402 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src')
-rw-r--r-- | src/inputPlugins/oggvorbis_plugin.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/inputPlugins/oggvorbis_plugin.c b/src/inputPlugins/oggvorbis_plugin.c index f3a321593..463ccc977 100644 --- a/src/inputPlugins/oggvorbis_plugin.c +++ b/src/inputPlugins/oggvorbis_plugin.c @@ -240,6 +240,7 @@ static int oggvorbis_decode(OutputBuffer * cb, DecoderControl * dc, long test; ReplayGainInfo * replayGainInfo = NULL; char ** comments; + char * errorStr; data.inStream = inStream; data.dc = dc; @@ -252,27 +253,28 @@ static int oggvorbis_decode(OutputBuffer * cb, DecoderControl * dc, if((ret = ov_open_callbacks(&data, &vf, NULL, 0, callbacks)) < 0) { closeInputStream(inStream); if(!dc->stop) { - ERROR("Error decoding Ogg Vorbis stream: "); switch(ret) { case OV_EREAD: - ERROR("read error\n"); + errorStr = "read error"; break; case OV_ENOTVORBIS: - ERROR("not vorbis stream\n"); + errorStr = "not vorbis stream"; break; case OV_EVERSION: - ERROR("vorbis version mismatch\n"); + errorStr = "vorbis version mismatch"; break; case OV_EBADHEADER: - ERROR("invalid vorbis header\n"); + errorStr = "invalid vorbis header"; break; case OV_EFAULT: - ERROR("internal logic error\n"); + errorStr = "internal logic error"; break; default: - ERROR("unknown error\n"); + errorStr = "unknown error"; break; } + ERROR("Error decoding Ogg Vorbis stream: %s\n", + errorStr); return -1; } else { |