bug 1207003 remove unnecessary EnsureTrack() call r=padenot

EnsureTrack() will be called in AdvanceOutputSegment(), if not blocked.

--HG--
extra : rebase_source : 1fe290135e2314bc518e8f67b6a98eddc6cf7768
This commit is contained in:
Karl Tomlinson 2015-09-09 18:41:50 +12:00
Родитель 58878018ac
Коммит 1dcbc7744e
1 изменённых файлов: 3 добавлений и 6 удалений

Просмотреть файл

@ -513,12 +513,6 @@ AudioNodeStream::UpMixDownMixChunk(const AudioBlock* aChunk,
void
AudioNodeStream::ProcessInput(GraphTime aFrom, GraphTime aTo, uint32_t aFlags)
{
if (!mFinished) {
EnsureTrack(AUDIO_TRACK);
}
// No more tracks will be coming
mBuffer.AdvanceKnownTracksTime(STREAM_TIME_MAX);
uint16_t outputCount = mLastChunks.Length();
MOZ_ASSERT(outputCount == std::max(uint16_t(1), mEngine->OutputCount()));
@ -605,6 +599,9 @@ void
AudioNodeStream::AdvanceOutputSegment()
{
StreamBuffer::Track* track = EnsureTrack(AUDIO_TRACK);
// No more tracks will be coming
mBuffer.AdvanceKnownTracksTime(STREAM_TIME_MAX);
AudioSegment* segment = track->Get<AudioSegment>();
if (mFlags & EXTERNAL_OUTPUT) {