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

Commit 4ed61f3f authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix mediadrmserver segfault in GTS tests" into pi-dev

parents e1460194 20795c7c
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -269,12 +269,16 @@ void CryptoHal::clearHeapBase(int32_t seqNum) {
     * TODO: Add a releaseSharedBuffer method in a future DRM HAL
     * API version to make this explicit.
     */
    uint32_t bufferId = mHeapBases.valueFor(seqNum).getBufferId();
    ssize_t index = mHeapBases.indexOfKey(seqNum);
    if (index >= 0) {
        if (mPlugin != NULL) {
            uint32_t bufferId = mHeapBases[index].getBufferId();
            Return<void> hResult = mPlugin->setSharedBufferBase(hidl_memory(), bufferId);
            ALOGE_IF(!hResult.isOk(), "setSharedBufferBase(): remote call failed");

        }
        mHeapBases.removeItem(seqNum);
    }
}

status_t CryptoHal::toSharedBuffer(const sp<IMemory>& memory, int32_t seqNum, ::SharedBuffer* buffer) {
    ssize_t offset;