decoder/mad: move variable declaration into "case"
This commit is contained in:
parent
dad1c21b59
commit
8c690fb737
|
@ -889,8 +889,6 @@ inline bool
|
||||||
MadDecoder::HandleCurrentFrame() noexcept
|
MadDecoder::HandleCurrentFrame() noexcept
|
||||||
{
|
{
|
||||||
switch (mute_frame) {
|
switch (mute_frame) {
|
||||||
DecoderCommand cmd;
|
|
||||||
|
|
||||||
case MadDecoderMuteFrame::SKIP:
|
case MadDecoderMuteFrame::SKIP:
|
||||||
mute_frame = MadDecoderMuteFrame::NONE;
|
mute_frame = MadDecoderMuteFrame::NONE;
|
||||||
break;
|
break;
|
||||||
|
@ -899,8 +897,8 @@ MadDecoder::HandleCurrentFrame() noexcept
|
||||||
mute_frame = MadDecoderMuteFrame::NONE;
|
mute_frame = MadDecoderMuteFrame::NONE;
|
||||||
UpdateTimerNextFrame();
|
UpdateTimerNextFrame();
|
||||||
break;
|
break;
|
||||||
case MadDecoderMuteFrame::NONE:
|
case MadDecoderMuteFrame::NONE: {
|
||||||
cmd = SynthAndSubmit();
|
const auto cmd = SynthAndSubmit();
|
||||||
UpdateTimerNextFrame();
|
UpdateTimerNextFrame();
|
||||||
if (cmd == DecoderCommand::SEEK) {
|
if (cmd == DecoderCommand::SEEK) {
|
||||||
assert(input_stream.IsSeekable());
|
assert(input_stream.IsSeekable());
|
||||||
|
@ -922,6 +920,7 @@ MadDecoder::HandleCurrentFrame() noexcept
|
||||||
} else if (cmd != DecoderCommand::NONE)
|
} else if (cmd != DecoderCommand::NONE)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue