Index: webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc |
diff --git a/webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc b/webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc |
index 1d462b3c9f24b0498d39941e2a73b6c343ef63b5..34b82c10723fb4c80489695fd0cc1f47bed1de90 100644 |
--- a/webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc |
+++ b/webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc |
@@ -507,7 +507,7 @@ int main(int argc, char* argv[]) { |
replacement_audio.reset(new int16_t[input_frame_size_timestamps]); |
payload_mem_size_bytes = 2 * input_frame_size_timestamps; |
payload.reset(new uint8_t[payload_mem_size_bytes]); |
- next_packet.reset(file_source->NextPacket()); |
+ next_packet = file_source->NextPacket(); |
assert(next_packet); |
next_packet_available = true; |
} |
@@ -580,9 +580,10 @@ int main(int argc, char* argv[]) { |
} |
// Get next packet from file. |
- webrtc::test::Packet* temp_packet = file_source->NextPacket(); |
+ std::unique_ptr<webrtc::test::Packet> temp_packet = |
+ file_source->NextPacket(); |
if (temp_packet) { |
- packet.reset(temp_packet); |
+ packet = std::move(temp_packet); |
if (replace_payload) { |
// At this point |packet| contains the packet *after* |next_packet|. |
// Swap Packet objects between |packet| and |next_packet|. |
@@ -600,6 +601,7 @@ int main(int argc, char* argv[]) { |
next_input_time_ms = std::numeric_limits<int64_t>::max(); |
packet_available = false; |
} |
+ RTC_DCHECK(!temp_packet); // Must have transferred to another variable. |
} |
// Check if it is time to get output audio. |