Skip to content

Commit

Permalink
Properly remove observer upon deconstruction (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidliu committed Jul 17, 2022
1 parent e88b47e commit 6c321f2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pc/video_rtp_receiver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ VideoRtpReceiver::VideoRtpReceiver(
VideoRtpReceiver::~VideoRtpReceiver() {
RTC_DCHECK_RUN_ON(&signaling_thread_checker_);
RTC_DCHECK(!media_channel_);

track_->UnregisterObserver(this);
}

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

0 comments on commit 6c321f2

Please sign in to comment.