Bug 1407895 - ensure mDecoder->Suspend() is called on a newly created decoder if mPausedForInactiveDocumentOrChannel is true. r=gerald

See comment 3 for the root cause.

MozReview-Commit-ID: CX5npKv2eWG
This commit is contained in:
JW Wang
2017-10-13 11:58:05 +08:00
parent 913df0a32f
commit c09e83fac7

View File

@@ -5071,6 +5071,10 @@ HTMLMediaElement::FinishDecoderSetup(MediaDecoder* aDecoder)
// This will also do an AddRemoveSelfReference.
NotifyOwnerDocumentActivityChanged();
if (mPausedForInactiveDocumentOrChannel) {
mDecoder->Suspend();
}
nsresult rv = NS_OK;
if (!mPaused) {
SetPlayedOrSeeked(true);