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

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

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

parents 32632fe8 b9016864
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;