Bug 1416473 - Don't treat MF_E_TRANSFORM_NEED_MORE_INPUT as fatal error. r=mattwoodrow, a=gchang
authorJean-Yves Avenard <jyavenard@mozilla.com>
Wed, 15 Nov 2017 19:29:24 +0100
changeset 444805 259b10e2934fd7043af8c575a013980e609bfe42
parent 444804 fb8050fb78aa4117614f8fa14de10cf08876e4f3
child 444806 df6d0aff01790273b36dae1cf0835e5d4d168eac
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow, gchang
bugs1416473
milestone58.0
Bug 1416473 - Don't treat MF_E_TRANSFORM_NEED_MORE_INPUT as fatal error. r=mattwoodrow, a=gchang 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
dom/media/platforms/wmf/WMFMediaDataDecoder.cpp
--- 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");