зеркало из https://github.com/mozilla/gecko-dev.git
bug 1190291 don't process blocks beyond aTicksToProcess in an offline graph r=padenot
--HG-- extra : rebase_source : 1f3d734e867f72125af6c3b87ac2217fc4bfee2c
This commit is contained in:
Родитель
0f7fc2c09c
Коммит
4876f80e75
|
@ -101,7 +101,7 @@ void GraphDriver::EnsureImmediateWakeUpLocked()
|
|||
|
||||
void GraphDriver::UpdateStateComputedTime(GraphTime aStateComputedTime)
|
||||
{
|
||||
MOZ_ASSERT(aStateComputedTime > mIterationEnd);
|
||||
MOZ_ASSERT(aStateComputedTime >= mIterationEnd);
|
||||
// The next state computed time can be the same as the previous, here: it
|
||||
// means the driver would be have been blocking indefinitly, but the graph has
|
||||
// been woken up right after having been to sleep.
|
||||
|
|
|
@ -1441,16 +1441,17 @@ MediaStreamGraphImpl::OneIteration(GraphTime aFrom, GraphTime aTo,
|
|||
|
||||
UpdateCurrentTimeForStreams(aFrom, aTo);
|
||||
|
||||
UpdateGraph(aStateEnd);
|
||||
GraphTime stateEnd = std::min(aStateEnd, mEndTime);
|
||||
UpdateGraph(stateEnd);
|
||||
|
||||
Process(aStateFrom, aStateEnd);
|
||||
Process(aStateFrom, stateEnd);
|
||||
|
||||
// Send updates to the main thread and wait for the next control loop
|
||||
// iteration.
|
||||
{
|
||||
MonitorAutoLock lock(mMonitor);
|
||||
bool finalUpdate = mForceShutDown ||
|
||||
(IterationEnd() >= mEndTime && AllFinishedStreamsNotified()) ||
|
||||
(stateEnd >= mEndTime && AllFinishedStreamsNotified()) ||
|
||||
(IsEmpty() && mBackMessageQueue.IsEmpty());
|
||||
PrepareUpdatesToMainThreadState(finalUpdate);
|
||||
if (finalUpdate) {
|
||||
|
@ -3443,7 +3444,9 @@ MediaStreamGraph::StartNonRealtimeProcessing(uint32_t aTicksToProcess)
|
|||
if (graph->mNonRealtimeProcessing)
|
||||
return;
|
||||
|
||||
graph->mEndTime = graph->IterationEnd() + aTicksToProcess;
|
||||
graph->mEndTime =
|
||||
graph->RoundUpToNextAudioBlock(graph->CurrentDriver()->StateComputedTime() +
|
||||
aTicksToProcess - 1);
|
||||
graph->mNonRealtimeProcessing = true;
|
||||
graph->EnsureRunInStableState();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче