mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
bug 1092932 detach MediaSource before initiating MDStateMachine shutdown r=bholley
to avoid races between the detach process and decoder task queue shutdown. --HG-- extra : rebase_source : 91761d9594c53a7ccb974caf4931bcac90533e5a
This commit is contained in:
parent
46fb464c21
commit
bbae2a8da1
@ -95,11 +95,13 @@ void
|
||||
MediaSourceDecoder::Shutdown()
|
||||
{
|
||||
MSE_DEBUG("MediaSourceDecoder(%p)::Shutdown", this);
|
||||
MediaDecoder::Shutdown();
|
||||
|
||||
// Detach first so that TrackBuffers are unused on the main thread when
|
||||
// shut down on the decode task queue.
|
||||
if (mMediaSource) {
|
||||
mMediaSource->Detach();
|
||||
}
|
||||
|
||||
MediaDecoder::Shutdown();
|
||||
// Kick WaitForData out of its slumber.
|
||||
ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
|
||||
mon.NotifyAll();
|
||||
|
Loading…
Reference in New Issue
Block a user