Merge "Fix C++11 Narrowing Errors in WVDrmPlugin"
This commit is contained in:
committed by
Android (Google) Code Review
commit
978f530e8b
@@ -1,8 +1,6 @@
|
|||||||
LOCAL_PATH := $(call my-dir)
|
LOCAL_PATH := $(call my-dir)
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
LOCAL_CLANG_CFLAGS += -Wno-error=c++11-narrowing
|
|
||||||
|
|
||||||
LOCAL_SRC_FILES := \
|
LOCAL_SRC_FILES := \
|
||||||
src/WVDrmPlugin.cpp \
|
src/WVDrmPlugin.cpp \
|
||||||
src/WVGenericCryptoInterface.cpp \
|
src/WVGenericCryptoInterface.cpp \
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ status_t WVDrmPlugin::getKeyRequest(
|
|||||||
!InitDataResemblesPSSH(initData)) {
|
!InitDataResemblesPSSH(initData)) {
|
||||||
// This data was passed in the old format, pre-unwrapped. We need to wrap
|
// This data was passed in the old format, pre-unwrapped. We need to wrap
|
||||||
// the init data in a new PSSH header.
|
// the init data in a new PSSH header.
|
||||||
static const char psshPrefix[] = {
|
static const uint8_t psshPrefix[] = {
|
||||||
0, 0, 0, 0, // Total size
|
0, 0, 0, 0, // Total size
|
||||||
'p', 's', 's', 'h', // "PSSH"
|
'p', 's', 's', 'h', // "PSSH"
|
||||||
0, 0, 0, 0, // Flags - must be zero
|
0, 0, 0, 0, // Flags - must be zero
|
||||||
@@ -178,7 +178,8 @@ status_t WVDrmPlugin::getKeyRequest(
|
|||||||
0xA3, 0xC8, 0x27, 0xDC, 0xD5, 0x1D, 0x21, 0xED,
|
0xA3, 0xC8, 0x27, 0xDC, 0xD5, 0x1D, 0x21, 0xED,
|
||||||
0, 0, 0, 0 // Size of initData
|
0, 0, 0, 0 // Size of initData
|
||||||
};
|
};
|
||||||
processedInitData.assign(psshPrefix, sizeof(psshPrefix) / sizeof(char));
|
processedInitData.assign(reinterpret_cast<const char*>(psshPrefix),
|
||||||
|
sizeof(psshPrefix) / sizeof(uint8_t));
|
||||||
processedInitData.append(reinterpret_cast<const char*>(initData.array()),
|
processedInitData.append(reinterpret_cast<const char*>(initData.array()),
|
||||||
initData.size());
|
initData.size());
|
||||||
const size_t kPsshBoxSizeLocation = 0;
|
const size_t kPsshBoxSizeLocation = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user