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

Commit bb2a83fc 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: e5867f41

Change-Id: I96d7f94cbe07a807a2af3af24a77ff8f6dc5421c
parents 09845958 e5867f41
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;