mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-22 23:27:30 +09:00
Issue #1558 - Prevent null deref crash in WebrtcVideoConduit DTOR
This commit is contained in:
parent
d2ec4693eb
commit
086a028a16
1 changed files with 7 additions and 0 deletions
|
|
@ -521,6 +521,8 @@ WebrtcVideoConduit::DeleteStreams()
|
||||||
mVideoCodecStat->EndOfCallStats();
|
mVideoCodecStat->EndOfCallStats();
|
||||||
}
|
}
|
||||||
mVideoCodecStat = nullptr;
|
mVideoCodecStat = nullptr;
|
||||||
|
//This does Release AudioConduit before mPtrViEBase set nullptr.
|
||||||
|
SyncTo(nullptr);
|
||||||
// We can't delete the VideoEngine until all these are released!
|
// We can't delete the VideoEngine until all these are released!
|
||||||
// And we can't use a Scoped ptr, since the order is arbitrary
|
// And we can't use a Scoped ptr, since the order is arbitrary
|
||||||
mPtrViEBase = nullptr;
|
mPtrViEBase = nullptr;
|
||||||
|
|
@ -543,6 +545,11 @@ WebrtcVideoConduit::SyncTo(WebrtcAudioConduit *aConduit)
|
||||||
{
|
{
|
||||||
CSFLogDebug(logTag, "%s Synced to %p", __FUNCTION__, aConduit);
|
CSFLogDebug(logTag, "%s Synced to %p", __FUNCTION__, aConduit);
|
||||||
|
|
||||||
|
if (!mPtrViEBase) {
|
||||||
|
// ViEBase has already been released; we no longer have a conduit.
|
||||||
|
mSyncedTo = nullptr;
|
||||||
|
return;
|
||||||
|
}
|
||||||
// SyncTo(value) syncs to the AudioConduit, and if already synced replaces
|
// SyncTo(value) syncs to the AudioConduit, and if already synced replaces
|
||||||
// the current sync target. SyncTo(nullptr) cancels any existing sync and
|
// the current sync target. SyncTo(nullptr) cancels any existing sync and
|
||||||
// releases the strong ref to AudioConduit.
|
// releases the strong ref to AudioConduit.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue