Bug 1601385 - Don't continue UpdateOutputTrackSources if the tracks-captured state changed. r=jib
Changing the tracks-captured state will trigger another run of UpdateOutputTrackSources, so continuing the current one is futile. The next run will properly re-evaluate all input state to this function. Differential Revision: https://phabricator.services.mozilla.com/D100004
This commit is contained in:
@@ -3686,6 +3686,9 @@ void HTMLMediaElement::UpdateOutputTrackSources() {
|
||||
mOutputStreams.RemoveElementAt(i);
|
||||
if (mOutputStreams.IsEmpty()) {
|
||||
mTracksCaptured = nullptr;
|
||||
// mTracksCaptured is one of the Watchables triggering this method.
|
||||
// Unsetting it here means we'll run through this method again very soon.
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user