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

Unified Diff: remoting/protocol/rtp_video_writer.cc

Issue 8116021: Switch remoting/protocol to new callbacks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 2 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/rtp_video_writer.h ('k') | remoting/protocol/rtp_video_writer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/rtp_video_writer.cc
diff --git a/remoting/protocol/rtp_video_writer.cc b/remoting/protocol/rtp_video_writer.cc
index ae85f8346da12f428457ebbd61648630d3def57d..c188d660daaa799388b1bccd4b1f666b8730f6b1 100644
--- a/remoting/protocol/rtp_video_writer.cc
+++ b/remoting/protocol/rtp_video_writer.cc
@@ -74,7 +74,8 @@ void RtpVideoWriter::Close() {
rtcp_channel_.reset();
}
-void RtpVideoWriter::ProcessVideoPacket(const VideoPacket* packet, Task* done) {
+void RtpVideoWriter::ProcessVideoPacket(const VideoPacket* packet,
+ const base::Closure& done) {
CHECK(packet->format().encoding() == VideoPacketFormat::ENCODING_VP8)
<< "Only VP8 is supported in RTP.";
@@ -128,8 +129,7 @@ void RtpVideoWriter::ProcessVideoPacket(const VideoPacket* packet, Task* done) {
}
DCHECK_EQ(position, payload.total_bytes());
- done->Run();
- delete done;
+ done.Run();
}
int RtpVideoWriter::GetPendingPackets() {
« no previous file with comments | « remoting/protocol/rtp_video_writer.h ('k') | remoting/protocol/rtp_video_writer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698