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 authored and cloudwebrtc committed Jun 5, 2023
1 parent 0cc025e commit 89117a2
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 @@ -53,6 +53,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 89117a2

Please sign in to comment.