bug 1304994 - resubmit input data when MFT returns MF_E_NOTACCEPTING. r=jya
authorAlastor Wu <alwu@mozilla.com>
Wed, 11 Jan 2017 11:10:10 +0800
changeset 375028 2d39564d82f344755a5277b7aa34c3f45f914d95
parent 375027 8a3833a05e17097d5e9aee574c3e1ee1c86bb9d1
child 375029 fb351cbb958a54870550ab19ec4503362404a69d
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya
bugs1304994
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 1304994 - resubmit input data when MFT returns MF_E_NOTACCEPTING. r=jya When MFT returns MF_E_NOTACCEPTING means the input buffer is full and it can't accept input data anymore, so we need to output the data first and then resummit the input data. MozReview-Commit-ID: DfSTASsEX7r
dom/media/platforms/wmf/WMFMediaDataDecoder.cpp
--- a/dom/media/platforms/wmf/WMFMediaDataDecoder.cpp
+++ b/dom/media/platforms/wmf/WMFMediaDataDecoder.cpp
@@ -116,16 +116,21 @@ void
 WMFMediaDataDecoder::ProcessDecode(MediaRawData* aSample)
 {
   if (mIsFlushing) {
     // Skip sample, to be released by runnable.
     return;
   }
 
   HRESULT hr = mMFTManager->Input(aSample);
+  if (hr == MF_E_NOTACCEPTING) {
+    ProcessOutput();
+    hr = mMFTManager->Input(aSample);
+  }
+
   if (FAILED(hr)) {
     NS_WARNING("MFTManager rejected sample");
     mCallback->Error(MediaResult(NS_ERROR_DOM_MEDIA_DECODE_ERR,
                                  RESULT_DETAIL("MFTManager::Input:%x", hr)));
     if (!mRecordedError) {
       SendTelemetry(hr);
       mRecordedError = true;
     }