handle decoding multiple frames in one Update() when not threaded
This commit is contained in:
@@ -892,6 +892,12 @@ void MovieTexture_FFMpeg::DecoderThread()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MovieTexture_FFMpeg::Update(float fDeltaTime)
|
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 )
|
if( !m_bThreaded )
|
||||||
{
|
{
|
||||||
@@ -925,6 +931,9 @@ void MovieTexture_FFMpeg::Update(float fDeltaTime)
|
|||||||
m_BufferFinished.Post();
|
m_BufferFinished.Post();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LOG->MapLog( "ffmpeg_looping", "MovieTexture_FFMpeg::Update looping" );
|
||||||
|
}
|
||||||
|
|
||||||
/* Call from the main thread when m_ImageWaiting == FRAME_WAITING to update the
|
/* Call from the main thread when m_ImageWaiting == FRAME_WAITING to update the
|
||||||
* texture. Sets FRAME_NONE. Does not signal m_BufferFinished. */
|
* texture. Sets FRAME_NONE. Does not signal m_BufferFinished. */
|
||||||
void MovieTexture_FFMpeg::UpdateFrame()
|
void MovieTexture_FFMpeg::UpdateFrame()
|
||||||
|
|||||||
Reference in New Issue
Block a user