Bug 1607205 - Reset RtcpEventObserver when deleting receive stream; r=ng

Holding a RefPtr to this in OnRtcpBye should keep the VideoConduit alive until
the callback completes. If this is not happening, it is likely that we're
racing with the destructor on the other thread. Clearing the callback early
will prevent this. This should not affect the VideoConduit because in that case
the callback is directly part of the receive stream, not attached to a channel.

Differential Revision: https://phabricator.services.mozilla.com/D60658

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Dan Minor 2020-01-22 16:06:28 +00:00
Родитель aad6b11a7d
Коммит 30ead31cc6
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -1014,6 +1014,8 @@ void WebrtcAudioConduit::DeleteRecvStream() {
mCall->Call()->DestroyAudioReceiveStream(mRecvStream);
mRecvStream = nullptr;
}
mRecvChannelProxy->SetRtcpEventObserver(nullptr);
// Destroying the stream unregisters the transport
mRecvChannelProxy->RegisterTransport(nullptr);
}