summaryrefslogtreecommitdiffstats
path: root/dom/media/MediaStreamGraph.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/media/MediaStreamGraph.cpp')
-rw-r--r--dom/media/MediaStreamGraph.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/dom/media/MediaStreamGraph.cpp b/dom/media/MediaStreamGraph.cpp
index 94cafa029..e2934cbb2 100644
--- a/dom/media/MediaStreamGraph.cpp
+++ b/dom/media/MediaStreamGraph.cpp
@@ -1715,6 +1715,10 @@ MediaStreamGraphImpl::RunInStableState(bool aSourceIsMSG)
RefPtr<GraphDriver> driver = CurrentDriver();
MonitorAutoUnlock unlock(mMonitor);
driver->Start();
+ // It's not safe to Shutdown() a thread from StableState, and
+ // releasing this may shutdown a SystemClockDriver thread.
+ // Proxy the release to outside of StableState.
+ NS_ReleaseOnMainThread(driver.forget(), true); // always proxy
}
}