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

Unified Diff: media/formats/mp4/mp4_stream_parser.cc

Issue 1874413003: Convert media/formats to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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: media/formats/mp4/mp4_stream_parser.cc
diff --git a/media/formats/mp4/mp4_stream_parser.cc b/media/formats/mp4/mp4_stream_parser.cc
index 49acc874863e6a0720061535600b5f271e3e9ed3..d248bad35656937158f6bd57f6499791abc27f4b 100644
--- a/media/formats/mp4/mp4_stream_parser.cc
+++ b/media/formats/mp4/mp4_stream_parser.cc
@@ -5,7 +5,9 @@
#include "media/formats/mp4/mp4_stream_parser.h"
#include <stddef.h>
+
#include <limits>
+#include <memory>
#include <utility>
#include <vector>
@@ -152,7 +154,7 @@ bool MP4StreamParser::ParseBox(bool* err) {
queue_.Peek(&buf, &size);
if (!size) return false;
- scoped_ptr<BoxReader> reader(
+ std::unique_ptr<BoxReader> reader(
BoxReader::ReadTopLevelBox(buf, size, media_log_, err));
if (reader.get() == NULL) return false;
@@ -189,7 +191,7 @@ bool MP4StreamParser::ParseMoov(BoxReader* reader) {
has_audio_ = false;
has_video_ = false;
- scoped_ptr<MediaTracks> media_tracks(new MediaTracks());
+ std::unique_ptr<MediaTracks> media_tracks(new MediaTracks());
AudioDecoderConfig audio_config;
VideoDecoderConfig video_config;
int detected_audio_track_count = 0;
@@ -534,7 +536,7 @@ bool MP4StreamParser::EnqueueSample(BufferQueue* audio_buffers,
queue_.PeekAt(runs_->sample_offset() + moof_head_, &buf, &buf_size);
if (buf_size < runs_->sample_size()) return false;
- scoped_ptr<DecryptConfig> decrypt_config;
+ std::unique_ptr<DecryptConfig> decrypt_config;
std::vector<SubsampleEntry> subsamples;
if (runs_->is_encrypted()) {
decrypt_config = runs_->GetDecryptConfig();

Powered by Google App Engine
This is Rietveld 408576698