diff options
author | Max Kellermann <max@musicpd.org> | 2021-05-25 21:31:42 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2021-05-25 21:34:09 +0200 |
commit | 8c690fb737052c7292367613b83f482803c70cc4 (patch) | |
tree | 2d1e13718b34bb2fb9ad2b9e06f89f857d0a0d87 | |
parent | dad1c21b59b123075c7fec48acf47c2fc8471e90 (diff) |
decoder/mad: move variable declaration into "case"
-rw-r--r-- | src/decoder/plugins/MadDecoderPlugin.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/decoder/plugins/MadDecoderPlugin.cxx b/src/decoder/plugins/MadDecoderPlugin.cxx index 8fb99a0cd..7b6c98eec 100644 --- a/src/decoder/plugins/MadDecoderPlugin.cxx +++ b/src/decoder/plugins/MadDecoderPlugin.cxx @@ -889,8 +889,6 @@ inline bool MadDecoder::HandleCurrentFrame() noexcept { switch (mute_frame) { - DecoderCommand cmd; - case MadDecoderMuteFrame::SKIP: mute_frame = MadDecoderMuteFrame::NONE; break; @@ -899,8 +897,8 @@ MadDecoder::HandleCurrentFrame() noexcept mute_frame = MadDecoderMuteFrame::NONE; UpdateTimerNextFrame(); break; - case MadDecoderMuteFrame::NONE: - cmd = SynthAndSubmit(); + case MadDecoderMuteFrame::NONE: { + const auto cmd = SynthAndSubmit(); UpdateTimerNextFrame(); if (cmd == DecoderCommand::SEEK) { assert(input_stream.IsSeekable()); @@ -922,6 +920,7 @@ MadDecoder::HandleCurrentFrame() noexcept } else if (cmd != DecoderCommand::NONE) return false; } + } return true; } |