зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1607205 - Reset RtcpEventObserver when deleting channels; 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:
Родитель
307e4dcb5b
Коммит
e5395de882
|
@ -36,6 +36,8 @@ class MockChannelProxy : public webrtc::voe::ChannelProxy {
|
|||
|
||||
void RegisterTransport(Transport* transport) override {}
|
||||
|
||||
void SetRtcpEventObserver(webrtc::RtcpEventObserver* observer) override {}
|
||||
|
||||
bool mSetSendAudioLevelIndicationStatusEnabled;
|
||||
bool mSetReceiveAudioLevelIndicationStatusEnabled;
|
||||
bool mSetReceiveCsrcAudioLevelIndicationStatusEnabled;
|
||||
|
|
|
@ -1134,6 +1134,7 @@ void WebrtcAudioConduit::DeleteChannels() {
|
|||
}
|
||||
|
||||
if (mRecvChannel != -1) {
|
||||
mRecvChannelProxy->SetRtcpEventObserver(nullptr);
|
||||
mRecvChannelProxy = nullptr;
|
||||
mPtrVoEBase->DeleteChannel(mRecvChannel);
|
||||
mRecvChannel = -1;
|
||||
|
|
|
@ -137,7 +137,7 @@ class ChannelProxy : public RtpPacketSinkInterface {
|
|||
virtual std::vector<webrtc::RtpSource> GetSources() const;
|
||||
|
||||
virtual void SetRtpPacketObserver(RtpPacketObserver* observer);
|
||||
void SetRtcpEventObserver(RtcpEventObserver* observer);
|
||||
virtual void SetRtcpEventObserver(RtcpEventObserver* observer);
|
||||
|
||||
private:
|
||||
Channel* channel() const;
|
||||
|
|
Загрузка…
Ссылка в новой задаче