aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins/mp3_plugin.c
diff options
context:
space:
mode:
authorJ. Alexander Treuman <jat@spatialrift.net>2006-07-26 03:17:30 +0000
committerJ. Alexander Treuman <jat@spatialrift.net>2006-07-26 03:17:30 +0000
commita570f8d9a910750cce231ed60491e21460d82b5e (patch)
tree8114dae9fbf1945881f89a8d2c9d37e09ef9009c /src/inputPlugins/mp3_plugin.c
parent13cca01c7b3c11539f0f7b4c666a57567ef003a2 (diff)
downloadmpd-a570f8d9a910750cce231ed60491e21460d82b5e.tar.gz
mpd-a570f8d9a910750cce231ed60491e21460d82b5e.tar.xz
mpd-a570f8d9a910750cce231ed60491e21460d82b5e.zip
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
Diffstat (limited to '')
-rw-r--r--src/inputPlugins/mp3_plugin.c17
1 files changed, 6 insertions, 11 deletions
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);