diff options
author | Max Kellermann <max@musicpd.org> | 2019-08-03 11:42:05 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2019-08-03 11:42:05 +0200 |
commit | fc18fd571c83b28e04631b43b71a3999296a5a89 (patch) | |
tree | 5c17ce2a057ed08a6b0f63de4d2ab75b01d7437a /src | |
parent | 51abed9732f9b84723a96d64104f9707a40d2e45 (diff) |
decoder/mad: return from SynthAndSubmit() early
Diffstat (limited to 'src')
-rw-r--r-- | src/decoder/plugins/MadDecoderPlugin.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/decoder/plugins/MadDecoderPlugin.cxx b/src/decoder/plugins/MadDecoderPlugin.cxx index 5d3cb5fec..24158bb49 100644 --- a/src/decoder/plugins/MadDecoderPlugin.cxx +++ b/src/decoder/plugins/MadDecoderPlugin.cxx @@ -892,9 +892,9 @@ MadDecoder::SynthAndSubmit() noexcept if (drop_end_samples && current_frame == max_frames - drop_end_frames - 1) { if (drop_end_samples >= pcm_length) - pcm_length = 0; - else - pcm_length -= drop_end_samples; + return DecoderCommand::STOP; + + pcm_length -= drop_end_samples; } auto cmd = SubmitPCM(i, pcm_length); |