Suppress DispatchOnAudioSinkComplete()

This commit is contained in:
trav90
2017-04-11 00:14:40 -05:00
committed by roytam1
parent 65da7c8f73
commit 9c1bc30965
+4 -1
View File
@@ -257,7 +257,10 @@ AudioSink::Cleanup()
AssertCurrentThreadInMonitor();
nsRefPtr<AudioStream> audioStream;
audioStream.swap(mAudioStream);
mStateMachine->DispatchOnAudioSinkComplete();
// Suppress the callback when the stop is requested by MediaDecoderStateMachine.
if (!mStopAudioThread) {
mStateMachine->DispatchOnAudioSinkComplete();
}
ReentrantMonitorAutoExit exit(GetReentrantMonitor());
audioStream->Shutdown();