Commit 586df8db authored by jrummell's avatar jrummell Committed by Commit bot

Remove checking for 'tenc' boxes when processing initData

BUG=none
TEST=compiles

Review URL: https://codereview.chromium.org/1130183009

Cr-Commit-Position: refs/heads/master@{#330599}
parent 0ab5b500
...@@ -51,7 +51,6 @@ const int kPsshSystemIdSize = 16; ...@@ -51,7 +51,6 @@ const int kPsshSystemIdSize = 16;
const int kPsshKidCountSize = 4; const int kPsshKidCountSize = 4;
const int kPsshKidSize = 16; const int kPsshKidSize = 16;
const int kPsshDataSizeSize = 4; const int kPsshDataSizeSize = 4;
const uint32_t kTencType = 0x74656e63;
const uint32_t kPsshType = 0x70737368; const uint32_t kPsshType = 0x70737368;
const uint8_t kWidevineUuid[16] = { const uint8_t kWidevineUuid[16] = {
...@@ -64,7 +63,7 @@ const uint8_t kWidevineUuid[16] = { ...@@ -64,7 +63,7 @@ const uint8_t kWidevineUuid[16] = {
// Notes: // Notes:
// 1, If multiple PSSH boxes are found,the "Data" of the first matching PSSH box // 1, If multiple PSSH boxes are found,the "Data" of the first matching PSSH box
// will be set in |pssh_data|. // will be set in |pssh_data|.
// 2, Only PSSH and TENC boxes are allowed in |data|. TENC boxes are skipped. // 2, Only PSSH boxes are allowed in |data|.
bool GetPsshData(const std::vector<uint8_t>& data, bool GetPsshData(const std::vector<uint8_t>& data,
std::vector<uint8_t>* pssh_data) { std::vector<uint8_t>* pssh_data) {
int bytes_left = base::checked_cast<int>(data.size()); int bytes_left = base::checked_cast<int>(data.size());
...@@ -97,14 +96,8 @@ bool GetPsshData(const std::vector<uint8_t>& data, ...@@ -97,14 +96,8 @@ bool GetPsshData(const std::vector<uint8_t>& data,
if (data_end < box_end) if (data_end < box_end)
return false; return false;
if (type == kTencType) { if (type != kPsshType)
// Skip 'tenc' box.
cur = box_end;
bytes_left = data_end - cur;
continue;
} else if (type != kPsshType) {
return false; return false;
}
const int kPsshBoxMinimumSize = const int kPsshBoxMinimumSize =
kPsshVersionFlagSize + kPsshSystemIdSize + kPsshDataSizeSize; kPsshVersionFlagSize + kPsshSystemIdSize + kPsshDataSizeSize;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment