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-06-23 12:19:46 +0300
committerHendrik Leppkes <h.leppkes@gmail.com>2016-06-23 12:20:55 +0300
commitaa73bdf154742737be206894088a06d097495b64 (patch)
tree1d7be326b84579c8036aa0e8a3484488a4edb75c /decoder
parent99d1c21d967644a873fee689b05b03c396fd1b6b (diff)
Clear the audio buffer when exceeding the max size
This may allow audio decoding to resume on the next packet.
Diffstat (limited to 'decoder')
-rw-r--r--decoder/LAVAudio/LAVAudio.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/decoder/LAVAudio/LAVAudio.cpp b/decoder/LAVAudio/LAVAudio.cpp
index 549f452d..e14a34e1 100644
--- a/decoder/LAVAudio/LAVAudio.cpp
+++ b/decoder/LAVAudio/LAVAudio.cpp
@@ -1693,6 +1693,8 @@ HRESULT CLAVAudio::Receive(IMediaSample *pIn)
// Ensure the size of the buffer doesn't overflow (its used as signed int in various places)
if (bufflen > (INT_MAX - (DWORD)len)) {
DbgLog((LOG_TRACE, 10, L"Too much audio buffered, aborting"));
+ m_buff.Clear();
+ m_bQueueResync = TRUE;
return E_FAIL;
}