DO NOT MERGE Move legacy widevine classic global lock from framework to vendor/widevine implementation.
am: eb9ea09db6
Change-Id: I5180b05591fe9bd96b0a7fea8dbddc3c601ee033
This commit is contained in:
@@ -26,6 +26,7 @@ using namespace android;
|
||||
|
||||
static sp<DecryptHandle> sDecryptHandle;
|
||||
static DrmManagerClient *sDrmManagerClient;
|
||||
static Mutex gWVMutex;
|
||||
|
||||
static void _cb1(char *data, unsigned long size)
|
||||
{
|
||||
@@ -88,6 +89,8 @@ bool IsWidevineMedia(const sp<DataSource>& dataSource) {
|
||||
ALOGV("IsWidevineMedia - insufficient data: %d", (int)bytesRead);
|
||||
} else {
|
||||
setenv("WV_SILENT", "true", 1);
|
||||
|
||||
Mutex::Autolock autoLock(gWVMutex);
|
||||
result = WV_IsWidevineMedia(buffer, kSniffSize);
|
||||
}
|
||||
delete[] buffer;
|
||||
@@ -110,6 +113,8 @@ WVMExtractorImpl::WVMExtractorImpl(sp<DataSource> dataSource)
|
||||
mError(OK),
|
||||
mSetupStatus(OK)
|
||||
{
|
||||
Mutex::Autolock autoLock(gWVMutex);
|
||||
|
||||
dataSource->getDrmInfo(sDecryptHandle, &sDrmManagerClient);
|
||||
|
||||
//ALOGD("WVMExtractorImpl::WVMExtractorImpl: uniqueId = %d", sDrmManagerClient->mUniqueId);
|
||||
|
||||
Reference in New Issue
Block a user