diff options
author | Max Kellermann <max@duempel.org> | 2014-08-26 10:33:12 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-08-26 10:34:04 +0200 |
commit | 58ec9d3a734541d6857a4bb82fc6579b83b63e87 (patch) | |
tree | ca39a87f38943675e901d533b241086d4fb5211b /src/decoder | |
parent | 4a503ba1ad9afcc8a29bb98c186c26927240caa6 (diff) |
decoder/mad: make variables more local
Diffstat (limited to 'src/decoder')
-rw-r--r-- | src/decoder/plugins/MadDecoderPlugin.cxx | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/decoder/plugins/MadDecoderPlugin.cxx b/src/decoder/plugins/MadDecoderPlugin.cxx index d522ab2cf..cc5468221 100644 --- a/src/decoder/plugins/MadDecoderPlugin.cxx +++ b/src/decoder/plugins/MadDecoderPlugin.cxx @@ -978,8 +978,6 @@ MadDecoder::SyncAndSend() inline bool MadDecoder::Read() { - enum mp3_action ret; - UpdateTimerNextFrame(); switch (mute_frame) { @@ -995,11 +993,10 @@ MadDecoder::Read() case MUTEFRAME_NONE: cmd = SyncAndSend(); if (cmd == DecoderCommand::SEEK) { - unsigned long j; - assert(input_stream.IsSeekable()); - j = TimeToFrame(decoder_seek_where(*decoder)); + unsigned long j = + TimeToFrame(decoder_seek_where(*decoder)); if (j < highest_frame) { if (Seek(frame_offsets[j])) { current_frame = j; @@ -1016,8 +1013,7 @@ MadDecoder::Read() } while (true) { - bool skip = false; - + enum mp3_action ret; do { Tag *tag = nullptr; @@ -1031,8 +1027,8 @@ MadDecoder::Read() } while (ret == DECODE_CONT); if (ret == DECODE_BREAK) return false; - else if (ret == DECODE_SKIP) - skip = true; + + const bool skip = ret == DECODE_SKIP; if (mute_frame == MUTEFRAME_NONE) { do { |