Bug 1172397 - Check for Conduit/Type mismatch on every frame. r=jesup, r=bwc

This commit is contained in:
Andreas Pehrson 2015-06-08 14:43:48 +08:00
parent 94fc63db8f
commit 068c9fe5e7

View File

@ -891,19 +891,19 @@ NewData(MediaStreamGraph* graph, TrackID tid,
return;
}
if (track_id_ != TRACK_INVALID) {
if (tid != track_id_) {
return;
}
} else if (conduit_->type() !=
(media.GetType() == MediaSegment::AUDIO ? MediaSessionConduit::AUDIO :
MediaSessionConduit::VIDEO)) {
// Ignore data in case we have a muxed stream
if (conduit_->type() !=
(media.GetType() == MediaSegment::AUDIO ? MediaSessionConduit::AUDIO :
MediaSessionConduit::VIDEO)) {
// Ignore data of wrong kind in case we have a muxed stream
return;
} else {
}
if (track_id_ == TRACK_INVALID) {
// Don't lock during normal media flow except on first sample
MutexAutoLock lock(mMutex);
track_id_ = track_id_external_ = tid;
} else if (tid != track_id_) {
return;
}
// TODO(ekr@rtfm.com): For now assume that we have only one