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

Unified Diff: media/formats/webm/opus_packet_builder.cc

Issue 2893953002: Revert of Remove ScopedVector from all other codes in media/ (Closed)
Patch Set: Created 3 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
« no previous file with comments | « media/formats/webm/opus_packet_builder.h ('k') | media/formats/webm/webm_cluster_parser_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 aa5fa7ad15a46cc868198a751e8752cf7f964d7e..bd85c3c5215afb084ef3bf9f85085688781ffa63 100644
--- a/media/formats/webm/opus_packet_builder.cc
+++ b/media/formats/webm/opus_packet_builder.cc
@@ -2,10 +2,8 @@
// 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"
-
-#include "base/logging.h"
-#include "base/memory/ptr_util.h"
#include "media/formats/webm/webm_cluster_parser.h"
namespace media {
@@ -64,8 +62,8 @@
return duration_ms_;
}
-std::vector<std::unique_ptr<OpusPacket>> BuildAllOpusPackets() {
- std::vector<std::unique_ptr<OpusPacket>> opus_packets;
+ScopedVector<OpusPacket> BuildAllOpusPackets() {
+ ScopedVector<OpusPacket> opus_packets;
for (int frame_count = kMinOpusPacketFrameCount;
frame_count <= kMaxOpusPacketFrameCount; frame_count++) {
@@ -73,14 +71,14 @@
opus_config_num++) {
bool is_VBR = false;
opus_packets.push_back(
- base::MakeUnique<OpusPacket>(opus_config_num, frame_count, is_VBR));
+ new 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(
- base::MakeUnique<OpusPacket>(opus_config_num, frame_count, is_VBR));
+ new OpusPacket(opus_config_num, frame_count, is_VBR));
}
}
}
« no previous file with comments | « media/formats/webm/opus_packet_builder.h ('k') | media/formats/webm/webm_cluster_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698