fix up infinite loop at EOF
This commit is contained in:
@@ -194,7 +194,7 @@ bool RageSoundReader_SpeedChange::Step()
|
|||||||
{
|
{
|
||||||
/* We're at EOF. Flush the remaining data, if any. */
|
/* We're at EOF. Flush the remaining data, if any. */
|
||||||
m_iUncorrelatedPos = m_Channels[0].m_iCorrelatedPos;
|
m_iUncorrelatedPos = m_Channels[0].m_iCorrelatedPos;
|
||||||
return m_iUncorrelatedPos < m_iDataBufferAvailFrames;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Starting at our preferred position (m_iUncorrelatedPos), within GetToleranceFrames(),
|
/* Starting at our preferred position (m_iUncorrelatedPos), within GetToleranceFrames(),
|
||||||
@@ -247,8 +247,9 @@ int RageSoundReader_SpeedChange::Read( char *buf, unsigned iLen )
|
|||||||
|
|
||||||
if( iCursorAvail == 0 )
|
if( iCursorAvail == 0 )
|
||||||
{
|
{
|
||||||
if( !Step() )
|
Step();
|
||||||
return 0;
|
if( !GetCursorAvail() )
|
||||||
|
return 0; // EOF
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user