Do not convert the protection scheme to network byte order

[ Merge of http://go/wvgerrit/19960 ]

Protections schemes are specified using a 4CC code {"cbc1", "cbcs",
"cenc", "cens"}. A host to network conversion was performed when the
PSSH was created and inserted into the license request. A reverse
conversion was performed when the code was extracted from the
license response.

These conversions are problematic if the PSSH is created externally and
passed into mediaDrm. To address this, the conversions have been removed
and allow protobuf to handle byte ordering. For backward compatibility
we allow codes in either ordering.

b/30713238

Change-Id: I25f01ecc621549fd3c13b443e4c8b89168463249
This commit is contained in:
Rahul Frias
2016-08-10 15:44:50 -07:00
parent eeb6606784
commit 6a206191f0
4 changed files with 131 additions and 8 deletions

View File

@@ -624,7 +624,7 @@ TEST_P(HlsConstructionTest, InitData) {
case kHlsMethodSampleAes: protection_scheme = kFourCcCbcs; break;
default: break;
}
EXPECT_EQ(protection_scheme, ntohl(cenc_header.protection_scheme()));
EXPECT_EQ(protection_scheme, cenc_header.protection_scheme());
}
}