Bug 1297265: P5. Rework Blank Decoder use of InputExhausted. r?kamidphish
MozReview-Commit-ID: KEfWo1cdRkG
--- a/dom/media/platforms/agnostic/BlankDecoderModule.cpp
+++ b/dom/media/platforms/agnostic/BlankDecoderModule.cpp
@@ -88,24 +88,23 @@ private:
if (!aData) {
mCallback->Error(MediaDataDecoderError::FATAL_ERROR);
return;
}
// Frames come out in DTS order but we need to output them in PTS order.
mReorderQueue.Push(aData);
- while (mReorderQueue.Length() > mMaxRefFrames) {
- mCallback->Output(mReorderQueue.Pop().get());
- }
-
if (mReorderQueue.Length() <= mMaxRefFrames) {
mCallback->InputExhausted();
+ } else {
+ while (mReorderQueue.Length() > mMaxRefFrames) {
+ mCallback->Output(mReorderQueue.Pop().get());
+ }
}
-
}
private:
nsAutoPtr<BlankMediaDataCreator> mCreator;
MediaDataDecoderCallback* mCallback;
const uint32_t mMaxRefFrames;
ReorderQueue mReorderQueue;
TrackInfo::TrackType mType;