Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/LAVFilters.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2016-03-17 14:47:37 +0300
committerHendrik Leppkes <h.leppkes@gmail.com>2016-03-17 14:47:37 +0300
commitedcf004674143246fe918be526d760a7dfb0595d (patch)
tree738d3cd8088e34b1d4f92ffda00a9c7fcb631ab5 /decoder
parentd3c65779ab8beef9a7891d27478ee88579b49815 (diff)
Add a helper function to consume data from a GrowableArray
Diffstat (limited to 'decoder')
-rw-r--r--decoder/LAVAudio/LAVAudio.cpp9
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;
}