Chromium Code Reviews| Index: media/formats/webm/opus_packet_builder.cc |
| diff --git a/media/formats/webm/opus_packet_builder.cc b/media/formats/webm/opus_packet_builder.cc |
| index bd85c3c5215afb084ef3bf9f85085688781ffa63..bcfd9c78898927cfaf1b12e68fea19ec59a0ff02 100644 |
| --- a/media/formats/webm/opus_packet_builder.cc |
| +++ b/media/formats/webm/opus_packet_builder.cc |
| @@ -2,8 +2,9 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#include "base/logging.h" |
| #include "media/formats/webm/opus_packet_builder.h" |
|
xhwang
2017/05/17 16:39:45
nit: add an empty line here
xiaofengzhang
2017/05/18 05:43:26
Done.
|
| +#include "base/logging.h" |
| +#include "base/memory/ptr_util.h" |
| #include "media/formats/webm/webm_cluster_parser.h" |
| namespace media { |
| @@ -62,8 +63,8 @@ double OpusPacket::duration_ms() const { |
| return duration_ms_; |
| } |
| -ScopedVector<OpusPacket> BuildAllOpusPackets() { |
| - ScopedVector<OpusPacket> opus_packets; |
| +std::vector<std::unique_ptr<OpusPacket>> BuildAllOpusPackets() { |
| + std::vector<std::unique_ptr<OpusPacket>> opus_packets; |
| for (int frame_count = kMinOpusPacketFrameCount; |
| frame_count <= kMaxOpusPacketFrameCount; frame_count++) { |
| @@ -71,14 +72,14 @@ ScopedVector<OpusPacket> BuildAllOpusPackets() { |
| opus_config_num++) { |
| bool is_VBR = false; |
| opus_packets.push_back( |
| - new OpusPacket(opus_config_num, frame_count, is_VBR)); |
| + base::MakeUnique<OpusPacket>(opus_config_num, frame_count, is_VBR)); |
| if (frame_count >= 2) { |
| // Add another packet with VBR flag toggled. For frame counts >= 2, |
| // VBR triggers changes to packet framing. |
| is_VBR = true; |
| opus_packets.push_back( |
| - new OpusPacket(opus_config_num, frame_count, is_VBR)); |
| + base::MakeUnique<OpusPacket>(opus_config_num, frame_count, is_VBR)); |
| } |
| } |
| } |