summaryrefslogtreecommitdiffstats
path: root/media/webrtc
diff options
context:
space:
mode:
authorFedor <fedor@mail.ru>2020-05-27 09:01:53 +0300
committerFedor <fedor@mail.ru>2020-05-27 09:01:53 +0300
commitd8eba6991dd64faf1c14b0cc200259398b64e4ac (patch)
tree624184efc424f96864094c0cc32947f256383e98 /media/webrtc
parent4d373c1d360b29f94026b72c6f66e4ad313732cf (diff)
downloadUXP-d8eba6991dd64faf1c14b0cc200259398b64e4ac.tar
UXP-d8eba6991dd64faf1c14b0cc200259398b64e4ac.tar.gz
UXP-d8eba6991dd64faf1c14b0cc200259398b64e4ac.tar.lz
UXP-d8eba6991dd64faf1c14b0cc200259398b64e4ac.tar.xz
UXP-d8eba6991dd64faf1c14b0cc200259398b64e4ac.zip
Issue #1558 - Prevent null deref crash in WebrtcVideoConduit DTOR
Diffstat (limited to 'media/webrtc')
-rwxr-xr-xmedia/webrtc/signaling/src/media-conduit/VideoConduit.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/media/webrtc/signaling/src/media-conduit/VideoConduit.cpp b/media/webrtc/signaling/src/media-conduit/VideoConduit.cpp
index b406fded5..95f599be4 100755
--- a/media/webrtc/signaling/src/media-conduit/VideoConduit.cpp
+++ b/media/webrtc/signaling/src/media-conduit/VideoConduit.cpp
@@ -521,6 +521,8 @@ WebrtcVideoConduit::DeleteStreams()
mVideoCodecStat->EndOfCallStats();
}
mVideoCodecStat = nullptr;
+ //This does Release AudioConduit before mPtrViEBase set nullptr.
+ SyncTo(nullptr);
// We can't delete the VideoEngine until all these are released!
// And we can't use a Scoped ptr, since the order is arbitrary
mPtrViEBase = nullptr;
@@ -543,6 +545,11 @@ WebrtcVideoConduit::SyncTo(WebrtcAudioConduit *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
// the current sync target. SyncTo(nullptr) cancels any existing sync and
// releases the strong ref to AudioConduit.