diff options
author | Max Kellermann <max@musicpd.org> | 2019-08-03 11:19:19 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2019-08-03 11:32:06 +0200 |
commit | 8a432c9b7f9808ccd168d8e33be3f828ec316cec (patch) | |
tree | d677bfd5c03c829b3797017de7b00e2ce148a2f9 /src | |
parent | 187204f03c319d68e7d883d644f96c353ff801e7 (diff) |
decoder/mad: move code to LoadNextFrame()
Diffstat (limited to 'src')
-rw-r--r-- | src/decoder/plugins/MadDecoderPlugin.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/decoder/plugins/MadDecoderPlugin.cxx b/src/decoder/plugins/MadDecoderPlugin.cxx index 7cc57b245..a73716cb1 100644 --- a/src/decoder/plugins/MadDecoderPlugin.cxx +++ b/src/decoder/plugins/MadDecoderPlugin.cxx @@ -207,6 +207,8 @@ private: */ bool HandleCurrentFrame() noexcept; + bool LoadNextFrame() noexcept; + bool Read() noexcept; }; @@ -965,11 +967,8 @@ MadDecoder::HandleCurrentFrame() noexcept } inline bool -MadDecoder::Read() noexcept +MadDecoder::LoadNextFrame() noexcept { - if (!HandleCurrentFrame()) - return false; - while (true) { MadDecoderAction ret; do { @@ -999,6 +998,13 @@ MadDecoder::Read() noexcept } } +inline bool +MadDecoder::Read() noexcept +{ + return HandleCurrentFrame() && + LoadNextFrame(); +} + inline void MadDecoder::RunDecoder() noexcept { |