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

Commit b0b882fb authored by Dongwon Kang's avatar Dongwon Kang Committed by android-build-merger
Browse files

Merge "Report error when using buffers for secure codec without providing crypto" into oc-dev

am: 88f181fe

Change-Id: Iec99a4cebc9088c13bcee0bb5aaf5f0258daab4c
parents 8c4762d8 88f181fe
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -734,6 +734,8 @@ status_t MediaCodec::configure(
            // XXX: save indication that it's crypto in some way...
            mAnalyticsItem->setInt32(kCodecCrypto, 1);
        }
    } else if (mFlags & kFlagIsSecure) {
        ALOGW("Crypto or descrambler should be given for secure codec");
    }

    // save msg for reset
@@ -2593,6 +2595,10 @@ status_t MediaCodec::queueCSDInputBuffer(size_t bufferIndex) {
    if (csd->size() > codecInputData->capacity()) {
        return -EINVAL;
    }
    if (codecInputData->data() == NULL) {
        ALOGV("Input buffer %zu is not properly allocated", bufferIndex);
        return -EINVAL;
    }

    memcpy(codecInputData->data(), csd->data(), csd->size());