b=1016177 don't create another AUDIO_TRACK after finishing r=roc

--HG--
extra : rebase_source : a7edebde196f08adb88fb008db84bcd17cf02ad7
This commit is contained in:
Karl Tomlinson 2014-06-05 10:11:52 +12:00
parent 7093899b67
commit 3f0f4411c9

View File

@ -439,7 +439,9 @@ AudioNodeStream::UpMixDownMixChunk(const AudioChunk* aChunk,
void
AudioNodeStream::ProcessInput(GraphTime aFrom, GraphTime aTo, uint32_t aFlags)
{
if (!mFinished) {
EnsureTrack(AUDIO_TRACK, mSampleRate);
}
// No more tracks will be coming
mBuffer.AdvanceKnownTracksTime(STREAM_TIME_MAX);
@ -522,6 +524,7 @@ AudioNodeStream::AdvanceOutputSegment()
TrackTicks
AudioNodeStream::GetCurrentPosition()
{
NS_ASSERTION(!mFinished, "Don't create another track after finishing");
return EnsureTrack(AUDIO_TRACK, mSampleRate)->Get<AudioSegment>()->GetDuration();
}