mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-14 04:03:47 +00:00
Bug 1402584. P2 - reset readyState to HAVE_NOTHING before loading next source child. See comment 18 for the root cause. r=gerald on a CLOSED TREE
Also assert readyState is HAVE_NOTHING before creating a new decoder. MozReview-Commit-ID: B0QACf96AA3 --HG-- extra : amend_source : ef4b41db04ee10f7eaae8f388d984ed0fd0863b5
This commit is contained in:
parent
f23594e114
commit
49c2485657
@ -1913,6 +1913,12 @@ void HTMLMediaElement::QueueLoadFromSourceTask()
|
||||
return;
|
||||
}
|
||||
|
||||
if (mDecoder) {
|
||||
// Reset readyState to HAVE_NOTHING since we're going to load a new decoder.
|
||||
ShutdownDecoder();
|
||||
ChangeReadyState(nsIDOMHTMLMediaElement::HAVE_NOTHING);
|
||||
}
|
||||
|
||||
ChangeDelayLoadStatus(true);
|
||||
ChangeNetworkState(nsIDOMHTMLMediaElement::NETWORK_LOADING);
|
||||
RefPtr<Runnable> r = NewRunnableMethod("HTMLMediaElement::LoadFromSourceChildren",
|
||||
@ -4856,6 +4862,7 @@ HTMLMediaElement::InitializeDecoderAsClone(ChannelMediaDecoder* aOriginal)
|
||||
{
|
||||
NS_ASSERTION(mLoadingSrc, "mLoadingSrc must already be set");
|
||||
NS_ASSERTION(mDecoder == nullptr, "Shouldn't have a decoder");
|
||||
MOZ_DIAGNOSTIC_ASSERT(mReadyState == nsIDOMHTMLMediaElement::HAVE_NOTHING);
|
||||
|
||||
MediaDecoderInit decoderInit(this,
|
||||
mMuted ? 0.0 : mVolume,
|
||||
@ -4909,6 +4916,7 @@ nsresult HTMLMediaElement::InitializeDecoderForChannel(nsIChannel* aChannel,
|
||||
nsIStreamListener** aListener)
|
||||
{
|
||||
NS_ASSERTION(mLoadingSrc, "mLoadingSrc must already be set");
|
||||
MOZ_DIAGNOSTIC_ASSERT(mReadyState == nsIDOMHTMLMediaElement::HAVE_NOTHING);
|
||||
|
||||
DecoderDoctorDiagnostics diagnostics;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user