diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2016-03-17 14:47:37 +0300 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2016-03-17 14:47:37 +0300 |
commit | edcf004674143246fe918be526d760a7dfb0595d (patch) | |
tree | 738d3cd8088e34b1d4f92ffda00a9c7fcb631ab5 /decoder | |
parent | d3c65779ab8beef9a7891d27478ee88579b49815 (diff) |
Add a helper function to consume data from a GrowableArray
Diffstat (limited to 'decoder')
-rw-r--r-- | decoder/LAVAudio/LAVAudio.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/decoder/LAVAudio/LAVAudio.cpp b/decoder/LAVAudio/LAVAudio.cpp index 4a76b6c8..7a706606 100644 --- a/decoder/LAVAudio/LAVAudio.cpp +++ b/decoder/LAVAudio/LAVAudio.cpp @@ -1833,14 +1833,7 @@ HRESULT CLAVAudio::ProcessBuffer(BOOL bEOF) consumed = min(consumed, buffer_size); // Remove the consumed data from the buffer - p += consumed; - if (p == end) { - m_buff.Clear(); - } else { - DWORD remaining = (DWORD)(end - p); - memmove(base, p, remaining); - m_buff.SetSize(remaining); - } + m_buff.Consume(consumed); return hr; } |