Bug 1214469 - Ensure gmp-clearkey accounts for mNumInputTasks when flushing. r=gerald

This commit is contained in:
Chris Pearce 2015-10-14 19:42:24 +13:00
parent e563339684
commit fff6c35860

View File

@ -141,17 +141,17 @@ VideoDecoder::DecodeTask(GMPVideoEncodedFrame* aInput)
AutoReleaseVideoFrame ensureFrameReleased(aInput);
HRESULT hr;
if (mIsFlushing) {
CK_LOGD("VideoDecoder::DecodeTask rejecting frame: flushing.");
return;
}
{
AutoLock lock(mMutex);
mNumInputTasks--;
assert(mNumInputTasks >= 0);
}
if (mIsFlushing) {
CK_LOGD("VideoDecoder::DecodeTask rejecting frame: flushing.");
return;
}
if (!aInput || !mHostAPI || !mDecoder) {
CK_LOGE("Decode job not set up correctly!");
return;