Commit 20ec787d authored by Andreas Pehrson's avatar Andreas Pehrson
Browse files

Bug 1673526 - Simplify send track recreation condition. r=bwc, a=RyanVM

Differential Revision: https://phabricator.services.mozilla.com/D98354
parent dedd908c
......@@ -1044,9 +1044,9 @@ nsresult MediaPipelineTransmit::SetTrack(RefPtr<MediaStreamTrack> aDomTrack) {
mSendPort = nullptr;
}
if (aDomTrack && mDomTrack && !aDomTrack->Ended() && !mDomTrack->Ended() &&
aDomTrack->Graph() != mDomTrack->Graph() && mSendTrack) {
// Recreate the send track if the new stream resides in different MTG.
if (aDomTrack && !aDomTrack->Ended() && mSendTrack &&
aDomTrack->Graph() != mSendTrack->Graph()) {
// 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
// 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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment