Index: webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.cc |
diff --git a/webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.cc b/webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.cc |
index 9c64e0fb4823ecf80a6d4f03e456e3111e369455..7118f4ed990025de6a3104d7848b7b3e2d0d9ad6 100644 |
--- a/webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.cc |
+++ b/webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.cc |
@@ -249,7 +249,6 @@ NetEqQualityTest::NetEqQualityTest(int block_duration_ms, |
neteq_.reset(NetEq::Create(config)); |
max_payload_bytes_ = in_size_samples_ * channels_ * sizeof(int16_t); |
in_data_.reset(new int16_t[in_size_samples_ * channels_]); |
- payload_.reset(new uint8_t[max_payload_bytes_]); |
out_data_.reset(new int16_t[out_size_samples_ * channels_]); |
} |
@@ -380,7 +379,7 @@ int NetEqQualityTest::Transmit() { |
if (!PacketLost()) { |
int ret = neteq_->InsertPacket( |
rtp_header_, |
- rtc::ArrayView<const uint8_t>(payload_.get(), payload_size_bytes_), |
+ rtc::ArrayView<const uint8_t>(payload_.data(), payload_size_bytes_), |
packet_input_time_ms * in_sampling_khz_); |
if (ret != NetEq::kOK) |
return -1; |
@@ -416,8 +415,9 @@ void NetEqQualityTest::Simulate() { |
// Assume 10 packets in packets buffer. |
while (decodable_time_ms_ - 10 * block_duration_ms_ < decoded_time_ms_) { |
ASSERT_TRUE(in_file_->Read(in_size_samples_ * channels_, &in_data_[0])); |
+ payload_.Clear(); |
payload_size_bytes_ = EncodeBlock(&in_data_[0], |
- in_size_samples_, &payload_[0], |
+ in_size_samples_, &payload_, |
max_payload_bytes_); |
total_payload_size_bytes_ += payload_size_bytes_; |
decodable_time_ms_ = Transmit() + block_duration_ms_; |