| Index: remoting/protocol/rtp_video_writer.cc
|
| diff --git a/remoting/protocol/rtp_video_writer.cc b/remoting/protocol/rtp_video_writer.cc
|
| index c188d660daaa799388b1bccd4b1f666b8730f6b1..dce34fc09635bb6d6a226770eeb4828bb12a77d7 100644
|
| --- a/remoting/protocol/rtp_video_writer.cc
|
| +++ b/remoting/protocol/rtp_video_writer.cc
|
| @@ -21,7 +21,8 @@ const int kMtu = 1200;
|
| } // namespace
|
|
|
| RtpVideoWriter::RtpVideoWriter(base::MessageLoopProxy* message_loop)
|
| - : initialized_(false),
|
| + : session_(NULL),
|
| + initialized_(false),
|
| rtp_writer_(message_loop) {
|
| }
|
|
|
| @@ -31,6 +32,7 @@ RtpVideoWriter::~RtpVideoWriter() {
|
|
|
| void RtpVideoWriter::Init(protocol::Session* session,
|
| const InitializedCallback& callback) {
|
| + session_ = session;
|
| initialized_callback_ = callback;
|
| session->CreateDatagramChannel(
|
| kVideoRtpChannelName,
|
| @@ -72,6 +74,11 @@ void RtpVideoWriter::Close() {
|
| rtp_writer_.Close();
|
| rtp_channel_.reset();
|
| rtcp_channel_.reset();
|
| + if (session_) {
|
| + session_->CancelChannelCreation(kVideoRtpChannelName);
|
| + session_->CancelChannelCreation(kVideoRtcpChannelName);
|
| + session_ = NULL;
|
| + }
|
| }
|
|
|
| void RtpVideoWriter::ProcessVideoPacket(const VideoPacket* packet,
|
|
|