Bug 621257 - Handle transition from buffering to seeking state correctly in Wave decoder. r=roc a=roc

This commit is contained in:
Matthew Gregan 2011-01-05 17:01:26 +13:00
Родитель 1dbe4b6627
Коммит f1f77805c3
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -470,7 +470,7 @@ nsWaveStateMachine::Seek(float aTime)
} else if (mState != STATE_SEEKING) {
if (mState == STATE_ENDED) {
mNextState = mPaused ? STATE_PAUSED : STATE_PLAYING;
} else {
} else if (mState != STATE_BUFFERING) {
mNextState = mState;
}
ChangeState(STATE_SEEKING);
@ -635,9 +635,9 @@ nsWaveStateMachine::Run()
PRInt64 availableOffset = mStream->GetCachedDataEnd(mPlaybackPosition);
// don't buffer if we're at the end of the stream, or if the
// Don't buffer if we're at the end of the stream, or if the
// load has been suspended by the cache (in the latter case
// we need to advance playback to free up cache space)
// we need to advance playback to free up cache space).
if (mState != STATE_ENDED &&
availableOffset < mPlaybackPosition + len &&
!mStream->IsSuspendedByCache()) {