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

Unified Diff: remoting/protocol/rtp_video_reader.cc

Issue 9827006: Refactor VideoStub interface to accept ownership of video packets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 months 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/protocol_mock_objects.h ('k') | remoting/protocol/rtp_video_reader_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/rtp_video_reader.cc
diff --git a/remoting/protocol/rtp_video_reader.cc b/remoting/protocol/rtp_video_reader.cc
index a4eeedf687739557cf88bfc10e387c0de4ab5627..ee0c5efefff4ce603a3af7dac792d7d91f3b7a2f 100644
--- a/remoting/protocol/rtp_video_reader.cc
+++ b/remoting/protocol/rtp_video_reader.cc
@@ -184,7 +184,7 @@ void RtpVideoReader::CheckFullPacket(const PacketsQueue::iterator& pos) {
void RtpVideoReader::RebuildVideoPacket(const PacketsQueue::iterator& first,
const PacketsQueue::iterator& last) {
- VideoPacket* packet = new VideoPacket();
+ scoped_ptr<VideoPacket> packet(new VideoPacket());
// Set flags.
if (first->packet->vp8_descriptor().frame_beginning)
@@ -216,8 +216,7 @@ void RtpVideoReader::RebuildVideoPacket(const PacketsQueue::iterator& first,
// Set format.
packet->mutable_format()->set_encoding(VideoPacketFormat::ENCODING_VP8);
- video_stub_->ProcessVideoPacket(
- packet, base::Bind(&base::DeletePointer<VideoPacket>, packet));
+ video_stub_->ProcessVideoPacket(packet.Pass(), base::Closure());
SendReceiverReportIf();
}
« no previous file with comments | « remoting/protocol/protocol_mock_objects.h ('k') | remoting/protocol/rtp_video_reader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698