Chromium Code Reviews| 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..3df1ada3ec52e9528db345903307a2c99e59d6dc 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,10 @@ void RtpVideoWriter::Close() { |
| rtp_writer_.Close(); |
| rtp_channel_.reset(); |
| rtcp_channel_.reset(); |
| + if (session_) { |
| + session_->CancelChannelCreation(kVideoRtpChannelName); |
| + session_->CancelChannelCreation(kVideoRtcpChannelName); |
| + } |
|
Wez
2011/11/15 22:29:13
Shouldn't this also clear |session_|? Can we just
Sergey Ulanov
2011/11/16 00:01:33
Done.
|
| } |
| void RtpVideoWriter::ProcessVideoPacket(const VideoPacket* packet, |