Bug 623637 - Change assertion into check in media data exhausted notification. r=roc a=roc

This commit is contained in:
Chris Pearce 2011-01-18 21:09:04 +13:00
Родитель 1945af8685
Коммит bbdaf318b3
1 изменённых файлов: 1 добавлений и 2 удалений

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

@ -907,10 +907,9 @@ void nsBuiltinDecoderStateMachine::NotifyDataExhausted()
{
MonitorAutoEnter mon(mDecoder->GetMonitor());
nsMediaStream* stream = mDecoder->GetCurrentStream();
NS_ASSERTION(!stream->IsDataCachedToEndOfStream(mDecoder->mDecoderPosition),
"We shouldn't be notified in this case!");
if (mDecoder->GetState() == nsBuiltinDecoder::PLAY_STATE_PLAYING &&
mState == DECODER_STATE_DECODING &&
!stream->IsDataCachedToEndOfStream(mDecoder->mDecoderPosition) &&
!stream->IsSuspended())
{
// Our decode has caught up with the download. Let's buffer to make sure