Bug 813190 - Stop media streams from hanging onto the last played media frame indefinitely. r=roc

This commit is contained in:
Mike Habicher 2012-11-20 20:32:06 -05:00
Родитель 9b5d35c82d
Коммит 6cfb1a6c03
1 изменённых файлов: 4 добавлений и 1 удалений

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

@ -833,6 +833,7 @@ MediaStreamGraphImpl::UpdateCurrentTime()
if (stream->mFinished && !stream->mNotifiedFinished &&
stream->mBufferStartTime + stream->GetBufferEnd() <= nextCurrentTime) {
stream->mNotifiedFinished = true;
stream->mLastPlayedVideoFrame.SetNull();
for (uint32_t j = 0; j < stream->mListeners.Length(); ++j) {
MediaStreamListener* l = stream->mListeners[j];
l->NotifyFinished(this);
@ -1296,7 +1297,9 @@ MediaStreamGraphImpl::PlayVideo(MediaStream* aStream)
NS_NewRunnableMethod(output, &VideoFrameContainer::Invalidate);
NS_DispatchToMainThread(event, NS_DISPATCH_NORMAL);
}
aStream->mLastPlayedVideoFrame = *frame;
if (!aStream->mNotifiedFinished) {
aStream->mLastPlayedVideoFrame = *frame;
}
}
void