Closed Bug 1214469 Opened 9 years ago Closed 9 years ago

[EME] gmp-clearkey doesn't account for mNumInputTasks when flushing

Categories

(Core :: Audio/Video: Playback, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox42 --- fixed
firefox43 --- fixed
firefox44 --- fixed

People

(Reporter: cpearce, Assigned: cpearce)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

From VideoDecoder.cpp:

void
VideoDecoder::DecodeTask(GMPVideoEncodedFrame* aInput)
{
  CK_LOGD("VideoDecoder::DecodeTask");
  AutoReleaseVideoFrame ensureFrameReleased(aInput);
  HRESULT hr;

  if (mIsFlushing) {
    CK_LOGD("VideoDecoder::DecodeTask rejecting frame: flushing.");
    return;
  }

  {
    AutoLock lock(mMutex);
    mNumInputTasks--;
    assert(mNumInputTasks >= 0);
  }
  // ...

The problem here is that if mIsFlushing it true, we won't decrement mNumInputTasks, and that means we won't call the input exhausted callback further down when we need to.

I bet this is the source of our timeouts.
If this fixes our tests on Windows, we should re-enable them, and uplift.
Flags: needinfo?(cpearce)
Attachment #8673441 - Flags: review?(gsquelart) → review+
https://hg.mozilla.org/mozilla-central/rev/942fff0fb140
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Comment on attachment 8673441 [details] [diff] [review]
Patch: Ensure gmp-clearkey accounts for mNumInputTasks when flushing.

Approval Request Comment
[Feature/regressing bug #]: EME
[User impact if declined]: This fixes intermittent timeouts in EME mochitests. This only affects clearkey EME, not Adobe EME.
[Describe test coverage new/current, TreeHerder]: Lots of EME mochitest, which are greener with this patch!
[Risks and why]: Low.
[String/UUID change made/needed]: None.
Attachment #8673441 - Flags: approval-mozilla-beta?
Attachment #8673441 - Flags: approval-mozilla-aurora?
Comment on attachment 8673441 [details] [diff] [review]
Patch: Ensure gmp-clearkey accounts for mNumInputTasks when flushing.

Improve the testsuite, taking it.
Should be in 42 beta 7
Attachment #8673441 - Flags: approval-mozilla-beta?
Attachment #8673441 - Flags: approval-mozilla-beta+
Attachment #8673441 - Flags: approval-mozilla-aurora?
Attachment #8673441 - Flags: approval-mozilla-aurora+
Flags: needinfo?(cpearce)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: