Skip to content

Commit 01ed14c

Browse files
authored
Properly remove observer upon deconstruction (#8) (#17)
(cherry picked from commit 829f351)
1 parent 798473d commit 01ed14c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pc/video_rtp_receiver.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ VideoRtpReceiver::VideoRtpReceiver(
5050
VideoRtpReceiver::~VideoRtpReceiver() {
5151
RTC_DCHECK_RUN_ON(&signaling_thread_checker_);
5252
RTC_DCHECK(!media_channel_);
53+
54+
track_->UnregisterObserver(this);
5355
}
5456

5557
std::vector<std::string> VideoRtpReceiver::stream_ids() const {

0 commit comments

Comments
 (0)