Bug 1409649 - shut down the decoder when MEDIA_ERR_ABORTED is received. r=gerald
http://searchfox.org/mozilla-central/rev/dca019c94bf3a840ed7ff50261483410cfece24f/dom/html/HTMLMediaElement.cpp#1395-1400 We need to shut down the decoder after setting network state to EMPTY. Otherwise the decoder will keep loading and change ready state to HAVE_METADATA or greater and then fail the assertion in AssertReadyStateIsNothing(). MozReview-Commit-ID: FpMDVAJHTS5
This commit is contained in:
@@ -1399,6 +1399,9 @@ public:
|
||||
mOwner->DispatchAsyncEvent(NS_LITERAL_STRING("abort"));
|
||||
mOwner->ChangeNetworkState(nsIDOMHTMLMediaElement::NETWORK_EMPTY);
|
||||
mOwner->DispatchAsyncEvent(NS_LITERAL_STRING("emptied"));
|
||||
if (mOwner->mDecoder) {
|
||||
mOwner->ShutdownDecoder();
|
||||
}
|
||||
} else if (aErrorCode == MEDIA_ERR_SRC_NOT_SUPPORTED) {
|
||||
mOwner->ChangeNetworkState(nsIDOMHTMLMediaElement::NETWORK_NO_SOURCE);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user