From 23725cd473577f9be84422f45450d332db4fc9f3 Mon Sep 17 00:00:00 2001 From: Matthew Gregan Date: Thu, 14 Feb 2013 10:57:46 +1300 Subject: [PATCH] Bug 841020 - Restore missing SetVolume when initializing AudioStream. r=cpearce --- content/media/MediaDecoderStateMachine.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/content/media/MediaDecoderStateMachine.cpp b/content/media/MediaDecoderStateMachine.cpp index 8f7a77928f8..13dbc0ef6fa 100644 --- a/content/media/MediaDecoderStateMachine.cpp +++ b/content/media/MediaDecoderStateMachine.cpp @@ -993,11 +993,11 @@ void MediaDecoderStateMachine::AudioLoop() ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor()); mAudioCompleted = false; audioStartTime = mAudioStartTime; + NS_ASSERTION(audioStartTime != -1, "Should have audio start time by now"); channels = mInfo.mAudioChannels; rate = mInfo.mAudioRate; - audioChannelType = mDecoder->GetAudioChannelType(); - NS_ASSERTION(audioStartTime != -1, "Should have audio start time by now"); + audioChannelType = mDecoder->GetAudioChannelType(); volume = mVolume; preservesPitch = mPreservesPitch; playbackRate = mPlaybackRate; @@ -1009,6 +1009,7 @@ void MediaDecoderStateMachine::AudioLoop() // initializing. nsAutoPtr audioStream(AudioStream::AllocateStream()); audioStream->Init(channels, rate, audioChannelType); + audioStream->SetVolume(volume); audioStream->SetPreservesPitch(preservesPitch); if (playbackRate != 1.0) { NS_ASSERTION(playbackRate != 0,