Index: webrtc/video/video_send_stream.cc |
diff --git a/webrtc/video/video_send_stream.cc b/webrtc/video/video_send_stream.cc |
index 8ccdc955e284588532bea986acc5387927757331..5c3f74fd7e815a7fdf13b194a82130b8698dc2f2 100644 |
--- a/webrtc/video/video_send_stream.cc |
+++ b/webrtc/video/video_send_stream.cc |
@@ -262,6 +262,8 @@ VideoSendStream::VideoSendStream( |
VideoSendStream::~VideoSendStream() { |
LOG(LS_INFO) << "~VideoSendStream: " << config_.ToString(); |
+ Stop(); |
+ |
module_process_thread_->DeRegisterModule(&overuse_detector_); |
// Remove vcm_protection_callback (part of vie_channel_) before destroying |
// ViEChannel. vcm_ is owned by ViEEncoder and the registered callback does |
@@ -302,13 +304,13 @@ void VideoSendStream::Start() { |
vie_encoder_.SendKeyFrame(); |
} |
vie_encoder_.Restart(); |
- vie_channel_.StartReceive(); |
+ vie_receiver_->StartReceive(); |
} |
void VideoSendStream::Stop() { |
// TODO(pbos): Make sure the encoder stops here. |
vie_channel_.StopSend(); |
- vie_channel_.StopReceive(); |
+ vie_receiver_->StopReceive(); |
transport_adapter_.Disable(); |
} |