mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 21:28:55 +00:00
Bug 813190 - Stop media streams from hanging onto the last played media frame indefinitely. r=roc
This commit is contained in:
parent
9b5d35c82d
commit
6cfb1a6c03
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user