aboutsummaryrefslogtreecommitdiffstats
path: root/src/mp3_decode.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-03-05 12:59:29 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-03-05 12:59:29 +0000
commitcc23d2e7e92d2e5165e998ff7e2e96a952205334 (patch)
tree199ebf4a2a7d3f5e43629ee652eb663356fb821b /src/mp3_decode.c
parentdb82d2fc8c0ec164e667a713188b2f4d7d63c106 (diff)
downloadmpd-cc23d2e7e92d2e5165e998ff7e2e96a952205334.tar.gz
mpd-cc23d2e7e92d2e5165e998ff7e2e96a952205334.tar.xz
mpd-cc23d2e7e92d2e5165e998ff7e2e96a952205334.zip
mute all frames that are "SKIP"'d
git-svn-id: https://svn.musicpd.org/mpd/trunk@201 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/mp3_decode.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mp3_decode.c b/src/mp3_decode.c
index d169c1394..4e50559ff 100644
--- a/src/mp3_decode.c
+++ b/src/mp3_decode.c
@@ -501,12 +501,13 @@ int mp3Read(mp3DecodeData * data, Buffer * cb, DecoderControl * dc) {
}
}
- if(data->muteFrame) {
- while((ret=decodeNextFrameHeader(data))==DECODE_CONT ||
+ while((ret=decodeNextFrameHeader(data))==DECODE_CONT ||
+ ret==DECODE_SKIP);
+ if(ret==DECODE_OK && !data->muteFrame) {
+ while((ret=decodeNextFrame(data))==DECODE_CONT ||
ret==DECODE_SKIP);
}
- else while((ret=decodeNextFrame(data))==DECODE_CONT ||
- ret==DECODE_SKIP);
+ if(ret==DECODE_SKIP) data->muteFrame = 1;
return ret;
}