| Index: media/mp4/box_definitions.cc
|
| diff --git a/media/mp4/box_definitions.cc b/media/mp4/box_definitions.cc
|
| index 9b64f48b1594567f4642af20d153fe8fd1d4e13c..ac7bd1a0173e2ff5afe1db05c0cf3ada95db2506 100644
|
| --- a/media/mp4/box_definitions.cc
|
| +++ b/media/mp4/box_definitions.cc
|
| @@ -26,11 +26,17 @@ ProtectionSystemSpecificHeader::~ProtectionSystemSpecificHeader() {}
|
| FourCC ProtectionSystemSpecificHeader::BoxType() const { return FOURCC_PSSH; }
|
|
|
| bool ProtectionSystemSpecificHeader::Parse(BoxReader* reader) {
|
| + // Validate the box's contents and hang on to the system ID.
|
| uint32 size;
|
| - return reader->ReadFullBoxHeader() &&
|
| + RCHECK(reader->ReadFullBoxHeader() &&
|
| reader->ReadVec(&system_id, 16) &&
|
| reader->Read4(&size) &&
|
| - reader->ReadVec(&data, size);
|
| + reader->HasBytes(size));
|
| +
|
| + // Copy the entire box, including the header, for passing to EME as initData.
|
| + DCHECK(raw_box.empty());
|
| + raw_box.assign(reader->data(), reader->data() + reader->size());
|
| + return true;
|
| }
|
|
|
| SampleAuxiliaryInformationOffset::SampleAuxiliaryInformationOffset() {}
|
|
|