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

Commit 1110775f authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Remove false warning message while extracting memory" into main am: e7400713

parents eb453296 e7400713
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -2990,11 +2990,16 @@ static void extractMemoryFromContext(
        }
        *memory = context->toHidlMemory();
    }
    if (context->mBlock == nullptr || context->mReadWriteMapping == nullptr) {
        ALOGW("extractMemoryFromContext: Cannot extract memory as C2Block is not created/mapped");
    if (context->mBlock == nullptr) {
        // this should be ok as we may only have IMemory/hidlMemory
        // e.g. video codecs may only have IMemory and no mBlock
        return;
    }
    if (context->mReadWriteMapping->error() != C2_OK) {

    // if we have mBlock and memory, then we will copy data from mBlock to hidlMemory
    // e.g. audio codecs may only have mBlock and wanted to decrypt using hidlMemory
    // and also wanted to re-use mBlock
    if (context->mReadWriteMapping == nullptr || context->mReadWriteMapping->error() != C2_OK) {
        ALOGW("extractMemoryFromContext: failed to map C2Block (%d)",
                context->mReadWriteMapping->error());
        return;