Improve buffering and fix memory leaks

Use a dedicated class to handle frame buffer
Fix memory leak in stream handler and frame allocation
This commit is contained in:
2017-09-22 00:54:46 +01:00
parent 58146a6b06
commit 1d07dd6b38
12 changed files with 159 additions and 160 deletions
+2
View File
@@ -113,6 +113,7 @@ UInt64 StreamHandlerPortableMap::calculateFrameNumber()
Bool StreamHandlerPortableMap::seek( UInt64 iFrameNum )
{
// m_uiCurrFrameFileIdx =
return true;
}
@@ -122,6 +123,7 @@ Bool StreamHandlerPortableMap::read( PlaYUVerFrame* pcFrame )
if( processed_bytes != m_uiNBytesPerFrame )
return false;
pcFrame->frameFromBuffer( m_pStreamBuffer, PLAYUVER_BIG_ENDIAN );
m_uiCurrFrameFileIdx++;
return true;
}