Bug 750163. MediaStreamGraphImpl::UpdateBufferSufficiencyState should skip tracks whose creation is pending --- there is no Track object for them yet. r=jesup

This commit is contained in:
Robert O'Callahan 2012-04-30 17:23:00 +12:00
parent a93b7b4a6a
commit 811676c320

View File

@ -668,6 +668,13 @@ MediaStreamGraphImpl::UpdateBufferSufficiencyState(SourceMediaStream* aStream)
MutexAutoLock lock(aStream->mMutex);
for (PRUint32 i = 0; i < aStream->mUpdateTracks.Length(); ++i) {
SourceMediaStream::TrackData* data = &aStream->mUpdateTracks[i];
if (data->mCommands & SourceMediaStream::TRACK_CREATE) {
// This track hasn't been created yet, so we have no sufficiency
// data. The track will be created in the next iteration of the
// control loop and then we'll fire insufficiency notifications
// if necessary.
continue;
}
if (data->mCommands & SourceMediaStream::TRACK_END) {
// This track will end, so no point in firing not-enough-data
// callbacks.