зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1673526 - Simplify send track recreation condition. r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D98354
This commit is contained in:
Родитель
83aebe0e67
Коммит
8da798d630
|
@ -1010,9 +1010,9 @@ nsresult MediaPipelineTransmit::SetTrack(RefPtr<MediaStreamTrack> aDomTrack) {
|
||||||
mSendPort = nullptr;
|
mSendPort = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (aDomTrack && mDomTrack && !aDomTrack->Ended() && !mDomTrack->Ended() &&
|
if (aDomTrack && !aDomTrack->Ended() && mSendTrack &&
|
||||||
aDomTrack->Graph() != mDomTrack->Graph() && mSendTrack) {
|
aDomTrack->Graph() != mSendTrack->Graph()) {
|
||||||
// Recreate the send track if the new stream resides in different MTG.
|
// Recreate the send track if the new stream resides in a different MTG.
|
||||||
// Stopping and re-starting will result in removing and re-adding the
|
// Stopping and re-starting will result in removing and re-adding the
|
||||||
// listener BUT in different threads, since tracks belong to different MTGs.
|
// listener BUT in different threads, since tracks belong to different MTGs.
|
||||||
// This can create thread races so we wait here for the stop to happen
|
// This can create thread races so we wait here for the stop to happen
|
||||||
|
|
Загрузка…
Ссылка в новой задаче