mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 981911 - Always call profiler_unregister_thread() when returning from MediaStreamGraphImpl::RunThread(). r=roc
This commit is contained in:
parent
68344fc7a2
commit
ee788e21b6
@ -1144,6 +1144,19 @@ MediaStreamGraphImpl::ResumeAllAudioOutputs()
|
||||
}
|
||||
}
|
||||
|
||||
struct AutoProfilerUnregisterThread
|
||||
{
|
||||
// The empty ctor is used to silence a pre-4.8.0 GCC unused variable warning.
|
||||
AutoProfilerUnregisterThread()
|
||||
{
|
||||
}
|
||||
|
||||
~AutoProfilerUnregisterThread()
|
||||
{
|
||||
profiler_unregister_thread();
|
||||
}
|
||||
};
|
||||
|
||||
void
|
||||
MediaStreamGraphImpl::RunThread()
|
||||
{
|
||||
@ -1156,6 +1169,7 @@ MediaStreamGraphImpl::RunThread()
|
||||
"Shouldn't have started a graph with empty message queue!");
|
||||
|
||||
uint32_t ticksProcessed = 0;
|
||||
AutoProfilerUnregisterThread autoUnregister;
|
||||
|
||||
for (;;) {
|
||||
// Update mCurrentTime to the min of the playing audio times, or using the
|
||||
@ -1320,8 +1334,6 @@ MediaStreamGraphImpl::RunThread()
|
||||
messageQueue.SwapElements(mMessageQueue);
|
||||
}
|
||||
}
|
||||
|
||||
profiler_unregister_thread();
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user