| Index: media/formats/mp4/track_run_iterator.cc
|
| diff --git a/media/formats/mp4/track_run_iterator.cc b/media/formats/mp4/track_run_iterator.cc
|
| index 7dae93801c8e4c2c4418b7219950fa4725756a15..7193b3d26dd9d5eb03b47ef298bc8d4d99ec11c6 100644
|
| --- a/media/formats/mp4/track_run_iterator.cc
|
| +++ b/media/formats/mp4/track_run_iterator.cc
|
| @@ -7,6 +7,7 @@
|
| #include <algorithm>
|
| #include <iomanip>
|
| #include <limits>
|
| +#include <memory>
|
|
|
| #include "base/macros.h"
|
| #include "media/formats/mp4/rcheck.h"
|
| @@ -280,7 +281,7 @@ bool TrackRunIterator::Init(const MovieFragment& moof) {
|
|
|
| const std::vector<uint8_t>& sample_encryption_data =
|
| traf.sample_encryption.sample_encryption_data;
|
| - scoped_ptr<BufferReader> sample_encryption_reader;
|
| + std::unique_ptr<BufferReader> sample_encryption_reader;
|
| uint32_t sample_encrytion_entries_count = 0;
|
| if (!sample_encryption_data.empty()) {
|
| sample_encryption_reader.reset(new BufferReader(
|
| @@ -589,13 +590,13 @@ const TrackEncryption& TrackRunIterator::track_encryption() const {
|
| return video_description().sinf.info.track_encryption;
|
| }
|
|
|
| -scoped_ptr<DecryptConfig> TrackRunIterator::GetDecryptConfig() {
|
| +std::unique_ptr<DecryptConfig> TrackRunIterator::GetDecryptConfig() {
|
| DCHECK(is_encrypted());
|
|
|
| if (run_itr_->sample_encryption_entries.empty()) {
|
| DCHECK_EQ(0, aux_info_size());
|
| MEDIA_LOG(ERROR, media_log_) << "Sample encryption info is not available.";
|
| - return scoped_ptr<DecryptConfig>();
|
| + return std::unique_ptr<DecryptConfig>();
|
| }
|
|
|
| size_t sample_idx = sample_itr_ - run_itr_->samples.begin();
|
| @@ -608,11 +609,11 @@ scoped_ptr<DecryptConfig> TrackRunIterator::GetDecryptConfig() {
|
| (!sample_encryption_entry.GetTotalSizeOfSubsamples(&total_size) ||
|
| total_size != static_cast<size_t>(sample_size()))) {
|
| MEDIA_LOG(ERROR, media_log_) << "Incorrect CENC subsample size.";
|
| - return scoped_ptr<DecryptConfig>();
|
| + return std::unique_ptr<DecryptConfig>();
|
| }
|
|
|
| const std::vector<uint8_t>& kid = GetKeyId(sample_idx);
|
| - return scoped_ptr<DecryptConfig>(new DecryptConfig(
|
| + return std::unique_ptr<DecryptConfig>(new DecryptConfig(
|
| std::string(reinterpret_cast<const char*>(&kid[0]), kid.size()),
|
| std::string(reinterpret_cast<const char*>(
|
| sample_encryption_entry.initialization_vector),
|
|
|