зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1105913 - [b2g] video can't playback after waking up from the dormant state, part 2 : revert changeset. r=roc.
This commit is contained in:
Родитель
35e5ba65a8
Коммит
b357dcd13a
|
@ -295,20 +295,18 @@ void MediaDecoder::DestroyDecodedStream()
|
|||
// be careful not to send any messages after the Destroy().
|
||||
if (os.mStream->IsDestroyed()) {
|
||||
// Probably the DOM MediaStream was GCed. Clean up.
|
||||
if (os.mPort) {
|
||||
MOZ_ASSERT(os.mPort, "Double-delete of the ports!");
|
||||
os.mPort->Destroy();
|
||||
}
|
||||
mOutputStreams.RemoveElementAt(i);
|
||||
continue;
|
||||
}
|
||||
os.mStream->ChangeExplicitBlockerCount(1);
|
||||
// Explicitly remove all existing ports. This is not strictly necessary but it's
|
||||
// good form.
|
||||
if (os.mPort) {
|
||||
MOZ_ASSERT(os.mPort, "Double-delete of the ports!");
|
||||
os.mPort->Destroy();
|
||||
os.mPort = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
mDecodedStream = nullptr;
|
||||
}
|
||||
|
@ -856,9 +854,8 @@ void MediaDecoder::PlaybackEnded()
|
|||
OutputStreamData& os = mOutputStreams[i];
|
||||
if (os.mStream->IsDestroyed()) {
|
||||
// Probably the DOM MediaStream was GCed. Clean up.
|
||||
if (os.mPort) {
|
||||
MOZ_ASSERT(os.mPort, "Double-delete of the ports!");
|
||||
os.mPort->Destroy();
|
||||
}
|
||||
mOutputStreams.RemoveElementAt(i);
|
||||
continue;
|
||||
}
|
||||
|
@ -866,9 +863,8 @@ void MediaDecoder::PlaybackEnded()
|
|||
// Shouldn't really be needed since mDecodedStream should already have
|
||||
// finished, but doesn't hurt.
|
||||
os.mStream->Finish();
|
||||
if (os.mPort) {
|
||||
MOZ_ASSERT(os.mPort, "Double-delete of the ports!");
|
||||
os.mPort->Destroy();
|
||||
}
|
||||
// Not really needed but it keeps the invariant that a stream not
|
||||
// connected to mDecodedStream is explicity blocked.
|
||||
os.mStream->ChangeExplicitBlockerCount(1);
|
||||
|
|
Загрузка…
Ссылка в новой задаче