Move OEMCrypto_Initialize earlier
Some OEMCrypto calls are happening before OEMCrypto_Initialize. This change moves initialization earlier so it occurs before any other calls to OEMCrypto. bug: 10582250 Change-Id: Ic8992e8f0738dbfeb10074a4e1543bb9931a49d5
This commit is contained in:
@@ -28,14 +28,14 @@ int64_t WVMMediaSource::sLastSeekTimeUs = -1;
|
||||
|
||||
WVMMediaSource::WVMMediaSource(WVSession *session, WVEsSelector esSelector,
|
||||
const sp<MetaData> &metaData, bool isLive,
|
||||
bool cryptoPluginMode)
|
||||
bool cryptoPluginMode, bool cryptoInitialized)
|
||||
: mSession(session),
|
||||
mESSelector(esSelector),
|
||||
mTrackMetaData(metaData),
|
||||
mStarted(false),
|
||||
mIsLiveStream(isLive),
|
||||
mNewSegment(false),
|
||||
mCryptoInitialized(false),
|
||||
mCryptoInitialized(cryptoInitialized),
|
||||
mStripADTS(false),
|
||||
mCryptoPluginMode(cryptoPluginMode),
|
||||
mGroup(NULL),
|
||||
@@ -45,16 +45,6 @@ WVMMediaSource::WVMMediaSource(WVSession *session, WVEsSelector esSelector,
|
||||
{
|
||||
_ah010(_cb);
|
||||
#ifdef REQUIRE_SECURE_BUFFERS
|
||||
if (esSelector == WV_EsSelector_Video) {
|
||||
if (!cryptoPluginMode) {
|
||||
OEMCryptoResult result = OEMCrypto_Initialize();
|
||||
if (result == OEMCrypto_SUCCESS) {
|
||||
mCryptoInitialized = true;
|
||||
} else {
|
||||
ALOGE("Crypto initialize failed (%d)", result);
|
||||
}
|
||||
}
|
||||
}
|
||||
mStripADTS = true;
|
||||
#else
|
||||
if (cryptoPluginMode) {
|
||||
|
||||
Reference in New Issue
Block a user