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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user