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

Unified Diff: webrtc/modules/audio_coding/neteq/tools/rtp_file_source.cc

Issue 2005873002: Let PacketSource::NextPacket() return an std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 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
Index: webrtc/modules/audio_coding/neteq/tools/rtp_file_source.cc
diff --git a/webrtc/modules/audio_coding/neteq/tools/rtp_file_source.cc b/webrtc/modules/audio_coding/neteq/tools/rtp_file_source.cc
index 039e1fae2e57a9fd8f07ca96a13d234d14f81a90..9ca48e9ea5be0caa5657474e0fff3745bc56ba66 100644
--- a/webrtc/modules/audio_coding/neteq/tools/rtp_file_source.cc
+++ b/webrtc/modules/audio_coding/neteq/tools/rtp_file_source.cc
@@ -55,7 +55,7 @@ bool RtpFileSource::RegisterRtpHeaderExtension(RTPExtensionType type,
return parser_->RegisterRtpHeaderExtension(type, id);
}
-Packet* RtpFileSource::NextPacket() {
+std::unique_ptr<Packet> RtpFileSource::NextPacket() {
while (true) {
RtpPacket temp_packet;
if (!rtp_reader_->NextPacket(&temp_packet)) {
@@ -80,7 +80,7 @@ Packet* RtpFileSource::NextPacket() {
// This payload type should be filtered out. Continue to the next packet.
continue;
}
- return packet.release();
+ return packet;
}
}

Powered by Google App Engine
This is Rietveld 408576698