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 Jan 18, 2023
1 parent f2e5734 commit 64f7f65
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 64f7f65

Please sign in to comment.