зеркало из https://github.com/mozilla/gecko-dev.git
Bug 485036 - Shut down nsAudioStream when decode state machine shuts down. r=chris.double, sr=roc
--HG-- extra : rebase_source : aed2f4e5b6375c506d2b3afec5cb81b97bdba21d
This commit is contained in:
Родитель
d22ed21f8e
Коммит
3ce0024448
|
@ -63,6 +63,7 @@ class nsAudioStream
|
|||
static void ShutdownLibrary();
|
||||
|
||||
nsAudioStream();
|
||||
~nsAudioStream();
|
||||
|
||||
// Initialize the audio stream. aNumChannels is the number of audio channels
|
||||
// (1 for mono, 2 for stereo, etc) and aRate is the frequency of the sound
|
||||
|
|
|
@ -72,6 +72,11 @@ nsAudioStream::nsAudioStream() :
|
|||
{
|
||||
}
|
||||
|
||||
nsAudioStream::~nsAudioStream()
|
||||
{
|
||||
Shutdown();
|
||||
}
|
||||
|
||||
void nsAudioStream::Init(PRInt32 aNumChannels, PRInt32 aRate, SampleFormat aFormat)
|
||||
{
|
||||
mRate = aRate;
|
||||
|
|
|
@ -916,6 +916,9 @@ nsresult nsOggDecodeStateMachine::Run()
|
|||
nsAutoMonitor mon(mDecoder->GetMonitor());
|
||||
switch(mState) {
|
||||
case DECODER_STATE_SHUTDOWN:
|
||||
if (mPlaying) {
|
||||
StopPlayback();
|
||||
}
|
||||
return NS_OK;
|
||||
|
||||
case DECODER_STATE_DECODING_METADATA:
|
||||
|
|
Загрузка…
Ссылка в новой задаче