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

Unified Diff: media/formats/mp4/avc.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/avc.cc
diff --git a/media/formats/mp4/avc.cc b/media/formats/mp4/avc.cc
index bd3e566a424b013742973e5a555f62ac896d6e98..7896e7c0d837f86ca1411f29f8fc8bf0e6874298 100644
--- a/media/formats/mp4/avc.cc
+++ b/media/formats/mp4/avc.cc
@@ -5,6 +5,7 @@
#include "media/formats/mp4/avc.h"
#include <algorithm>
+#include <memory>
#include <utility>
#include "base/logging.h"
@@ -106,7 +107,7 @@ bool AVC::InsertParamSetsAnnexB(const AVCDecoderConfigurationRecord& avc_config,
std::vector<SubsampleEntry>* subsamples) {
DCHECK(AVC::IsValidAnnexB(*buffer, *subsamples));
- scoped_ptr<H264Parser> parser(new H264Parser());
+ std::unique_ptr<H264Parser> parser(new H264Parser());
const uint8_t* start = &(*buffer)[0];
parser->SetEncryptedStream(start, buffer->size(), *subsamples);
@@ -311,9 +312,9 @@ bool AVC::IsValidAnnexB(const uint8_t* buffer,
}
AVCBitstreamConverter::AVCBitstreamConverter(
- scoped_ptr<AVCDecoderConfigurationRecord> avc_config)
+ std::unique_ptr<AVCDecoderConfigurationRecord> avc_config)
: avc_config_(std::move(avc_config)) {
- DCHECK(avc_config_);
+ DCHECK(avc_config_);
}
AVCBitstreamConverter::~AVCBitstreamConverter() {

Powered by Google App Engine
This is Rietveld 408576698