summaryrefslogtreecommitdiff
path: root/src/PCM_Parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/PCM_Parser.cpp')
-rwxr-xr-xsrc/PCM_Parser.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/PCM_Parser.cpp b/src/PCM_Parser.cpp
index b8dea71..9efd388 100755
--- a/src/PCM_Parser.cpp
+++ b/src/PCM_Parser.cpp
@@ -170,9 +170,9 @@ ASDCP::PCM::WAVParser::h__WAVParser::ReadFrame(FrameBuffer& FB)
}
ui32_t read_count = 0;
- Result_t result = m_FileReader.Read(FB.Data(), m_FrameBufferSize, &read_count);
+ Result_t result = m_FileReader.Read(FB.Data(), (m_DataLength - m_ReadCount >= m_FrameBufferSize) ? m_FrameBufferSize : m_DataLength - m_ReadCount, &read_count);
- if ( result == RESULT_ENDOFFILE )
+ if ( result == RESULT_ENDOFFILE || (m_DataLength == m_ReadCount + read_count) )
{
m_EOF = true;