mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 848954 - Part 28 - Properly stop the driver when shutting down the graph. r=jesup
(this was originaly present, probably caused by a bad rebase)
This commit is contained in:
parent
1e9aca6c1d
commit
4d9c2e35fb
@ -589,8 +589,6 @@ AudioCallbackDriver::StartStream()
|
||||
void
|
||||
AudioCallbackDriver::Stop()
|
||||
{
|
||||
MOZ_ASSERT(!NS_IsMainThread(), "This is blocking and should not be called on the main thread.");
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("Stopping audio threads for MediaStreamGraph %p", mGraphImpl));
|
||||
if (cubeb_stream_stop(mAudioStream) != CUBEB_OK) {
|
||||
NS_WARNING("Could not stop cubeb stream for MSG.");
|
||||
}
|
||||
|
@ -1450,11 +1450,13 @@ public:
|
||||
NS_ASSERTION(mGraph->mDetectedNotRunning,
|
||||
"We should know the graph thread control loop isn't running!");
|
||||
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("Shutting down graph %p", mGraph));
|
||||
|
||||
if (mGraph->CurrentDriver()->AsAudioCallbackDriver()) {
|
||||
MOZ_ASSERT(!mGraph->CurrentDriver()->AsAudioCallbackDriver()->InCallback());
|
||||
}
|
||||
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("Shutting drown graph %p", mGraph));
|
||||
mGraph->CurrentDriver()->Stop();
|
||||
|
||||
// mGraph's thread is not running so it's OK to do whatever here
|
||||
if (mGraph->IsEmpty()) {
|
||||
|
Loading…
Reference in New Issue
Block a user