Bug 1383628. P2 - move the call to Load() into Clone(). r=gerald
MozReview-Commit-ID: 9k8BXLwAepI
This commit is contained in:
@@ -4721,10 +4721,6 @@ HTMLMediaElement::InitializeDecoderAsClone(ChannelMediaDecoder* aOriginal)
|
||||
NS_ASSERTION(mLoadingSrc, "mLoadingSrc must already be set");
|
||||
NS_ASSERTION(mDecoder == nullptr, "Shouldn't have a decoder");
|
||||
|
||||
MediaResource* originalResource = aOriginal->GetResource();
|
||||
if (!originalResource)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
MediaDecoderInit decoderInit(this,
|
||||
mAudioChannel,
|
||||
mMuted ? 0.0 : mVolume,
|
||||
@@ -4742,14 +4738,6 @@ HTMLMediaElement::InitializeDecoderAsClone(ChannelMediaDecoder* aOriginal)
|
||||
|
||||
LOG(LogLevel::Debug, ("%p Cloned decoder %p from %p", this, decoder.get(), aOriginal));
|
||||
|
||||
nsresult rv = decoder->Load(originalResource);
|
||||
if (NS_FAILED(rv)) {
|
||||
decoder->Shutdown();
|
||||
LOG(LogLevel::Debug,
|
||||
("%p Failed to load for decoder %p", this, decoder.get()));
|
||||
return rv;
|
||||
}
|
||||
|
||||
return FinishDecoderSetup(decoder);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user