Bug 1153344 - Suppress DispatchOnAudioSinkComplete() r=cpearce

This commit is contained in:
Sotaro Ikeda 2015-04-16 06:46:01 -07:00
parent 312251badd
commit e44bd1f136

View File

@ -256,7 +256,11 @@ AudioSink::Cleanup()
AssertCurrentThreadInMonitor();
nsRefPtr<AudioStream> audioStream;
audioStream.swap(mAudioStream);
mStateMachine->DispatchOnAudioSinkComplete();
// Suppress the callback when the stop is requested by MediaDecoderStateMachine.
// See Bug 115334.
if (!mStopAudioThread) {
mStateMachine->DispatchOnAudioSinkComplete();
}
ReentrantMonitorAutoExit exit(GetReentrantMonitor());
audioStream->Shutdown();