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

Unified Diff: media/cdm/cenc_utils.cc

Issue 2966493005: Turn MediaLog usage from plain wrong into questionable (Closed)
Patch Set: Created 3 years, 6 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 | « no previous file | media/formats/mp4/box_reader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cdm/cenc_utils.cc
diff --git a/media/cdm/cenc_utils.cc b/media/cdm/cenc_utils.cc
index 20267c94ff016b2382fd9782a8d830931e7c51d1..f885061731c8e7a9bca270ff4fad65a6b2ec4369 100644
--- a/media/cdm/cenc_utils.cc
+++ b/media/cdm/cenc_utils.cc
@@ -32,6 +32,9 @@ static bool ReadAllPsshBoxes(
std::vector<mp4::FullProtectionSystemSpecificHeader>* pssh_boxes) {
DCHECK(!input.empty());
+ // TODO(wolenetz): Questionable MediaLog usage, http://crbug.com/712310
+ MediaLog media_log;
+
// Verify that |input| contains only 'pssh' boxes.
// ReadAllChildrenAndCheckFourCC() is templated, so it checks that each
// box in |input| matches the box type of the parameter (in this case
@@ -40,7 +43,8 @@ static bool ReadAllPsshBoxes(
// so this simply verifies that |input| only contains 'pssh' boxes and
// nothing else.
std::unique_ptr<mp4::BoxReader> input_reader(
- mp4::BoxReader::ReadConcatentatedBoxes(input.data(), input.size()));
+ mp4::BoxReader::ReadConcatentatedBoxes(input.data(), input.size(),
+ &media_log));
std::vector<mp4::ProtectionSystemSpecificHeader> raw_pssh_boxes;
if (!input_reader->ReadAllChildrenAndCheckFourCC(&raw_pssh_boxes))
return false;
@@ -53,7 +57,8 @@ static bool ReadAllPsshBoxes(
for (const auto& raw_pssh_box : raw_pssh_boxes) {
std::unique_ptr<mp4::BoxReader> raw_pssh_reader(
mp4::BoxReader::ReadConcatentatedBoxes(raw_pssh_box.raw_box.data(),
- raw_pssh_box.raw_box.size()));
+ raw_pssh_box.raw_box.size(),
+ &media_log));
// ReadAllChildren() appends any successfully parsed box onto it's
// parameter, so |pssh_boxes| will contain the collection of successfully
// parsed 'pssh' boxes. If an error occurs, try the next box.
« no previous file with comments | « no previous file | media/formats/mp4/box_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698