Bug 1185416 - Don't stop AudioSink prematurely when decoding is completed. r=kinetik.

This commit is contained in:
JW Wang 2015-07-19 21:25:02 +08:00
parent 23db672d3a
commit 7994882590

View File

@ -2456,12 +2456,12 @@ nsresult MediaDecoderStateMachine::RunStateMachine()
AbstractThread::MainThread()->Dispatch(event.forget());
mSentPlaybackEndedEvent = true;
}
// Stop audio sink after call to AudioEndTime() above, otherwise it will
// return an incorrect value due to a null mAudioSink.
StopAudioThread();
mDecodedStream->StopPlayback();
// Stop audio sink after call to AudioEndTime() above, otherwise it will
// return an incorrect value due to a null mAudioSink.
StopAudioThread();
mDecodedStream->StopPlayback();
}
return NS_OK;
}