Bug 1301059: Do not use H264Converter when video decode is suspended. r?kaku
MozReview-Commit-ID: FWvn3Xkalsl
--- a/dom/media/platforms/PDMFactory.cpp
+++ b/dom/media/platforms/PDMFactory.cpp
@@ -262,17 +262,17 @@ PDMFactory::CreateDecoderWithPDM(Platfor
TimeDuration::FromMilliseconds(MediaPrefs::PDMFuzzingInterval()));
callbackWrapper->SetDontDelayInputExhausted(!MediaPrefs::PDMFuzzingDelayInputExhausted());
callback = callbackWrapper.get();
}
CreateDecoderParams params = aParams;
params.mCallback = callback;
- if (MP4Decoder::IsH264(config.mMimeType)) {
+ if (MP4Decoder::IsH264(config.mMimeType) && !aParams.mUseBlankDecoder) {
RefPtr<H264Converter> h = new H264Converter(aPDM, params);
const nsresult rv = h->GetLastError();
if (NS_SUCCEEDED(rv) || rv == NS_ERROR_NOT_INITIALIZED) {
// The H264Converter either successfully created the wrapped decoder,
// or there wasn't enough AVCC data to do so. Otherwise, there was some
// problem, for example WMF DLLs were missing.
m = h.forget();
}