mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
Bug 1586387 - Don't append a device change message to a graph that is going away. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D48553 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
1417210039
commit
cea60bb690
@ -866,6 +866,15 @@ void MediaTrackGraphImpl::DeviceChanged() {
|
||||
MediaTrackGraphImpl* mGraphImpl;
|
||||
};
|
||||
|
||||
if (mMainThreadTrackCount == 0 && mMainThreadPortCount == 0) {
|
||||
// This is a special case where the origin of this event cannot control the
|
||||
// lifetime of the graph, because the graph is controling the lifetime of
|
||||
// the AudioCallbackDriver where the event originated.
|
||||
// We know the graph is soon going away, so there's no need to notify about
|
||||
// this device change.
|
||||
return;
|
||||
}
|
||||
|
||||
// Reset the latency, it will get fetched again next time it's queried.
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
mAudioOutputLatency = 0.0;
|
||||
|
Loading…
Reference in New Issue
Block a user