handle decoding multiple frames in one Update() when not threaded

This commit is contained in:
Glenn Maynard
2004-10-18 18:40:28 +00:00
parent 79b6b5c596
commit b0c8f70c87
@@ -892,6 +892,12 @@ void MovieTexture_FFMpeg::DecoderThread()
}
void MovieTexture_FFMpeg::Update(float fDeltaTime)
{
/* We might need to decode more than one frame per update. However, there
* have been bugs in ffmpeg that cause it to not handle EOF properly, which
* could make this never return, so let's play it safe. */
int iMax = 4;
while( --iMax )
{
if( !m_bThreaded )
{
@@ -925,6 +931,9 @@ void MovieTexture_FFMpeg::Update(float fDeltaTime)
m_BufferFinished.Post();
}
LOG->MapLog( "ffmpeg_looping", "MovieTexture_FFMpeg::Update looping" );
}
/* Call from the main thread when m_ImageWaiting == FRAME_WAITING to update the
* texture. Sets FRAME_NONE. Does not signal m_BufferFinished. */
void MovieTexture_FFMpeg::UpdateFrame()