Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2306)

Unified Diff: remoting/protocol/rtp_reader.cc

Issue 4779001: Added CompoundBuffer that will be used to store data in the encoding/decoding (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/protocol/rtp_reader.h ('k') | remoting/protocol/rtp_video_reader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/rtp_reader.cc
diff --git a/remoting/protocol/rtp_reader.cc b/remoting/protocol/rtp_reader.cc
index 9609a6d0624427d61d084fbbfa950bd6bf8be984..b989c4481db2424e3d4d9835fdd63cf7fafd7bec 100644
--- a/remoting/protocol/rtp_reader.cc
+++ b/remoting/protocol/rtp_reader.cc
@@ -26,14 +26,13 @@ void RtpReader::Init(net::Socket* socket,
void RtpReader::OnDataReceived(net::IOBuffer* buffer, int data_size) {
RtpPacket packet;
int header_size = UnpackRtpHeader(reinterpret_cast<uint8*>(buffer->data()),
- data_size, &packet.header);
+ data_size, packet.mutable_header());
if (header_size < 0) {
LOG(WARNING) << "Received invalid RTP packet.";
return;
}
- packet.data = buffer;
- packet.payload = buffer->data() + header_size;
- packet.payload_size = data_size - header_size;
+ packet.mutable_payload()->Append(buffer, buffer->data() + header_size,
+ data_size - header_size);
on_message_callback_->Run(packet);
}
« no previous file with comments | « remoting/protocol/rtp_reader.h ('k') | remoting/protocol/rtp_video_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698