aboutsummaryrefslogtreecommitdiffstats
path: root/src/mp3_decode.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-05-21 22:41:00 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-05-21 22:41:00 +0000
commit28e29a29e9f0fee15aeb94828cfc0e2bc4304489 (patch)
tree278fcb02b947badd09010775410b25de0073643b /src/mp3_decode.c
parent547e358796b9d82041b94f18f9ddcb972b8f1e7e (diff)
downloadmpd-28e29a29e9f0fee15aeb94828cfc0e2bc4304489.tar.gz
mpd-28e29a29e9f0fee15aeb94828cfc0e2bc4304489.tar.xz
mpd-28e29a29e9f0fee15aeb94828cfc0e2bc4304489.zip
fix a bug in decodeFirstFrame when just decoding tags and not passing
a DecoderControl git-svn-id: https://svn.musicpd.org/mpd/trunk@1126 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/mp3_decode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mp3_decode.c b/src/mp3_decode.c
index eab53d5ba..643604fe1 100644
--- a/src/mp3_decode.c
+++ b/src/mp3_decode.c
@@ -347,10 +347,10 @@ int decodeFirstFrame(mp3DecodeData * data, DecoderControl * dc) {
while((ret = decodeNextFrameHeader(data))==DECODE_CONT &&
(!dc || !dc->stop));
if(ret==DECODE_SKIP) skip = 1;
- else if(ret==DECODE_BREAK || dc->stop) return -1;
+ else if(ret==DECODE_BREAK || (dc && dc->stop)) return -1;
while((ret = decodeNextFrame(data))==DECODE_CONT &&
(!dc || !dc->stop));
- if(ret==DECODE_BREAK || dc->stop) return -1;
+ if(ret==DECODE_BREAK || (dc && dc->stop)) return -1;
if(!skip && ret==DECODE_OK) break;
}