aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins/mp3_plugin.c
diff options
context:
space:
mode:
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);