aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-03-05 12:48:57 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-03-05 12:48:57 +0000
commitdb82d2fc8c0ec164e667a713188b2f4d7d63c106 (patch)
tree56f1211e213bd4f220ba95acd12c14248665fd63
parent4e4faf61748d7f10b5d96aa0f9125bf248675de0 (diff)
downloadmpd-db82d2fc8c0ec164e667a713188b2f4d7d63c106.tar.gz
mpd-db82d2fc8c0ec164e667a713188b2f4d7d63c106.tar.xz
mpd-db82d2fc8c0ec164e667a713188b2f4d7d63c106.zip
lets SKIP all recorable stream errors
git-svn-id: https://svn.musicpd.org/mpd/trunk@200 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-rw-r--r--src/mp3_decode.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/mp3_decode.c b/src/mp3_decode.c
index 42afdac6a..d169c1394 100644
--- a/src/mp3_decode.c
+++ b/src/mp3_decode.c
@@ -188,8 +188,8 @@ int decodeNextFrameHeader(mp3DecodeData * data) {
}
}
if(mad_header_decode(&data->frame.header,&data->stream)) {
- if((data->stream).error==MAD_ERROR_LOSTSYNC) {
#ifdef HAVE_ID3TAG
+ if((data->stream).error==MAD_ERROR_LOSTSYNC) {
signed long tagsize = id3_tag_query(
(data->stream).this_frame,
(data->stream).bufend-
@@ -198,10 +198,9 @@ int decodeNextFrameHeader(mp3DecodeData * data) {
mad_stream_skip(&(data->stream),tagsize);
return DECODE_CONT;
}
-#endif
- return DECODE_SKIP;
}
- if(MAD_RECOVERABLE((data->stream).error)) return DECODE_CONT;
+#endif
+ if(MAD_RECOVERABLE((data->stream).error)) return DECODE_SKIP;
else {
if((data->stream).error==MAD_ERROR_BUFLEN) return DECODE_CONT;
else
@@ -224,9 +223,9 @@ int decodeNextFrame(mp3DecodeData * data) {
return DECODE_BREAK;
}
}
+#ifdef HAVE_ID3TAG
if(mad_frame_decode(&data->frame,&data->stream)) {
if((data->stream).error==MAD_ERROR_LOSTSYNC) {
-#ifdef HAVE_ID3TAG
signed long tagsize = id3_tag_query(
(data->stream).this_frame,
(data->stream).bufend-
@@ -235,10 +234,9 @@ int decodeNextFrame(mp3DecodeData * data) {
mad_stream_skip(&(data->stream),tagsize);
return DECODE_CONT;
}
-#endif
- return DECODE_SKIP;
}
- if(MAD_RECOVERABLE((data->stream).error)) return DECODE_CONT;
+#endif
+ if(MAD_RECOVERABLE((data->stream).error)) return DECODE_SKIP;
else {
if((data->stream).error==MAD_ERROR_BUFLEN) return DECODE_CONT;
else