Bug 1285867 (Part 1) - Remove Decoder's notion of decoder errors. r=edwin
This commit is contained in:
@@ -135,8 +135,7 @@ DecoderFactory::CreateDecoder(DecoderType aType,
|
||||
MOZ_ASSERT(NS_SUCCEEDED(rv), "Bad downscale-during-decode target size?");
|
||||
}
|
||||
|
||||
decoder->Init();
|
||||
if (NS_FAILED(decoder->GetDecoderError())) {
|
||||
if (NS_FAILED(decoder->Init())) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -180,8 +179,7 @@ DecoderFactory::CreateAnimationDecoder(DecoderType aType,
|
||||
decoder->SetDecoderFlags(aDecoderFlags | DecoderFlags::IS_REDECODE);
|
||||
decoder->SetSurfaceFlags(aSurfaceFlags);
|
||||
|
||||
decoder->Init();
|
||||
if (NS_FAILED(decoder->GetDecoderError())) {
|
||||
if (NS_FAILED(decoder->Init())) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -218,8 +216,7 @@ DecoderFactory::CreateMetadataDecoder(DecoderType aType,
|
||||
decoder->SetIterator(aSourceBuffer->Iterator());
|
||||
decoder->SetSampleSize(aSampleSize);
|
||||
|
||||
decoder->Init();
|
||||
if (NS_FAILED(decoder->GetDecoderError())) {
|
||||
if (NS_FAILED(decoder->Init())) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -267,8 +264,7 @@ DecoderFactory::CreateDecoderForICOResource(DecoderType aType,
|
||||
MOZ_ASSERT(NS_SUCCEEDED(rv), "Bad downscale-during-decode target size?");
|
||||
}
|
||||
|
||||
decoder->Init();
|
||||
if (NS_FAILED(decoder->GetDecoderError())) {
|
||||
if (NS_FAILED(decoder->Init())) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -313,8 +309,7 @@ DecoderFactory::CreateAnonymousDecoder(DecoderType aType,
|
||||
MOZ_ASSERT(NS_SUCCEEDED(rv), "Bad downscale-during-decode target size?");
|
||||
}
|
||||
|
||||
decoder->Init();
|
||||
if (NS_FAILED(decoder->GetDecoderError())) {
|
||||
if (NS_FAILED(decoder->Init())) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -338,8 +333,7 @@ DecoderFactory::CreateAnonymousMetadataDecoder(DecoderType aType,
|
||||
decoder->SetIterator(aSourceBuffer->Iterator());
|
||||
decoder->SetDecoderFlags(DecoderFlags::FIRST_FRAME_ONLY);
|
||||
|
||||
decoder->Init();
|
||||
if (NS_FAILED(decoder->GetDecoderError())) {
|
||||
if (NS_FAILED(decoder->Init())) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user