Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08dbccd2 authored by Jeff Tinker's avatar Jeff Tinker
Browse files

DO NOT MERGE Move legacy widevine classic global lock from framework to

vendor/widevine implementation.

This prevents a hang on contention for the lock if the datasource
read blocks during sniffing.

bug:28888414
Change-Id: Idb2a8653744535f711139c87f39b259daddbf337
parent 98810b1a
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -42,13 +42,9 @@ void *gVendorLibHandle = NULL;

namespace android {

static Mutex gWVMutex;

WVMExtractor::WVMExtractor(const sp<DataSource> &source)
    : mDataSource(source)
{
    Mutex::Autolock autoLock(gWVMutex);

    if (!getVendorLibHandle()) {
        return;
    }
@@ -169,8 +165,6 @@ bool SniffWVM(
    const sp<DataSource> &source, String8 *mimeType, float *confidence,
        sp<AMessage> *) {

    Mutex::Autolock autoLock(gWVMutex);

    if (!WVMExtractor::getVendorLibHandle()) {
        return false;
    }