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

Commit 25990e35 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "ACodec: bypass crypto / descrambler if input is empty" into rvc-dev am:...

Merge "ACodec: bypass crypto / descrambler if input is empty" into rvc-dev am: e5867f41 am: bb2a83fc

Change-Id: Idefd98f6fd6ff7916c87cd5afdf88df8538ecb5c
parents 8d9fe493 bb2a83fc
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -134,7 +134,12 @@ status_t ACodecBufferChannel::queueSecureInputBuffer(
    }
    ssize_t result = -1;
    ssize_t codecDataOffset = 0;
    if (mCrypto != NULL) {
    if (numSubSamples == 1
            && subSamples[0].mNumBytesOfClearData == 0
            && subSamples[0].mNumBytesOfEncryptedData == 0) {
        // We don't need to go through crypto or descrambler if the input is empty.
        result = 0;
    } else if (mCrypto != NULL) {
        hardware::drm::V1_0::DestinationBuffer destination;
        if (secure) {
            destination.type = DrmBufferType::NATIVE_HANDLE;