Bug 1416473 - Don't treat MF_E_TRANSFORM_NEED_MORE_INPUT as fatal error. r?mattwoodrow
The VP9 decoder following a flush will often return MF_E_NOTACCEPTING. Attempting to request an output would cause the error MF_E_TRANSFORM_NEED_MORE_INPUT to be returned. We can simply feed the decoder with the compressed sample.
MozReview-Commit-ID: GUNniZsOKWr
--- a/dom/media/platforms/wmf/WMFMediaDataDecoder.cpp
+++ b/dom/media/platforms/wmf/WMFMediaDataDecoder.cpp
@@ -127,17 +127,17 @@ WMFMediaDataDecoder::ProcessError(HRESUL
RefPtr<MediaDataDecoder::DecodePromise>
WMFMediaDataDecoder::ProcessDecode(MediaRawData* aSample)
{
DecodedData results;
HRESULT hr = mMFTManager->Input(aSample);
if (hr == MF_E_NOTACCEPTING) {
hr = ProcessOutput(results);
- if (FAILED(hr)) {
+ if (FAILED(hr) && hr != MF_E_TRANSFORM_NEED_MORE_INPUT) {
return ProcessError(hr, "MFTManager::Output(1)");
}
hr = mMFTManager->Input(aSample);
}
if (FAILED(hr)) {
NS_WARNING("MFTManager rejected sample");
return ProcessError(hr, "MFTManager::Input");