From a570f8d9a910750cce231ed60491e21460d82b5e Mon Sep 17 00:00:00 2001 From: "J. Alexander Treuman" Date: Wed, 26 Jul 2006 03:17:30 +0000 Subject: Screw this found_* stuff, just wrap parse_*() in an if git-svn-id: https://svn.musicpd.org/mpd/trunk@4465 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/inputPlugins/mp3_plugin.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'src/inputPlugins') diff --git a/src/inputPlugins/mp3_plugin.c b/src/inputPlugins/mp3_plugin.c index b6487e7c3..1041c2134 100644 --- a/src/inputPlugins/mp3_plugin.c +++ b/src/inputPlugins/mp3_plugin.c @@ -614,8 +614,6 @@ static int decodeFirstFrame(mp3DecodeData * data, DecoderControl * dc, struct lame lame; struct mad_bitptr ptr; int bitlen; - int found_xing; - int found_lame; int ret; int skip; @@ -637,17 +635,14 @@ static int decodeFirstFrame(mp3DecodeData * data, DecoderControl * dc, ptr = data->stream.anc_ptr; bitlen = data->stream.anc_bitlen; - found_xing = parse_xing(&xing, &ptr, &bitlen); - found_lame = (found_xing ? parse_lame(&lame, &ptr, &bitlen) : 0); - - if (found_lame) { - data->dropSamplesAtStart = lame.encoderDelay + DECODERDELAY; - data->dropSamplesAtEnd = lame.encoderPadding; - } - - if (found_xing) { + if (parse_xing(&xing, &ptr, &bitlen)) { data->muteFrame = MUTEFRAME_SKIP; + if (parse_lame(&lame, &ptr, &bitlen) : 0) + data->dropSamplesAtStart = lame.encoderDelay + DECODERDELAY; + data->dropSamplesAtEnd = lame.encoderPadding; + } + if (xing.flags & XING_FRAMES) { mad_timer_t duration = data->frame.header.duration; mad_timer_multiply(&duration, xing.frames); -- cgit v1.2.3