bug 1304994 - resubmit input data when MFT returns MF_E_NOTACCEPTING.
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
--- a/dom/media/platforms/wmf/WMFMediaDataDecoder.cpp
+++ b/dom/media/platforms/wmf/WMFMediaDataDecoder.cpp
@@ -116,16 +116,23 @@ 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) {
+ while (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;
}