Closed Bug 1199193 Opened 5 years ago Closed 5 years ago
Complete() is called before all frames are output
This is a regression introduced by bug 1192675 and what caused bug 1198094 to be backed out. When we drain the mac decoder; either the VDA or VT one ask the framework to drain its pending frames (VDA) or wait for async decoding to complete (VT). This will cause the callback to be called with the drained frames. Once we're done waiting for the drain in ProcessDrain() will immediately issue DrainComplete(). However, following bug 1192675, the decoder's callback queue a task for each drained frames . This task will only get to run once ProcessDrain() completes. We should issue the DrainComplete() callback only once all the drained frames have been process in AppleVDADecoder::OutputFrame.
We ensure thread-safety by making OutputFrame thread-safe and extend the use of the monitor to protect mReorderQueue. Ensuring that following a drain, no pending tasks were pending and doing the right thing was just too complicated, especially with a flushable taskqueue where none can guarantee a dispatched task will actually run.
Attachment #8653476 - Flags: review?(giles)
Backed out for a youtube playback regression. See Bug 1199573. https://hg.mozilla.org/releases/mozilla-aurora/rev/5bb661db5c6c
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
You need to log in before you can comment on or make changes to this bug.