mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 831427: Gate RemoveListener(stream) to avoid calling if Destroy() pending r=roc
This commit is contained in:
parent
c856ab3666
commit
db14a79f0f
@ -306,6 +306,8 @@ MediaEngineWebRTCAudioSource::Process(const int channel,
|
||||
|
||||
SourceMediaStream *source = mSources[i];
|
||||
if (source) {
|
||||
// This is safe from any thread, and is safe if the track is Finished
|
||||
// or Destroyed
|
||||
source->AppendToTrack(mTrackID, &segment);
|
||||
}
|
||||
}
|
||||
|
@ -125,7 +125,10 @@ public:
|
||||
if (mStream && !mRemoved) {
|
||||
MM_LOG(("Listener removed on purpose, mFinished = %d", (int) mFinished));
|
||||
mRemoved = true; // RemoveListener is async, avoid races
|
||||
mStream->RemoveListener(this);
|
||||
// If it's destroyed, don't call - listener will be removed and we'll be notified!
|
||||
if (!mStream->IsDestroyed()) {
|
||||
mStream->RemoveListener(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user