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

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

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

parents 064e8f2e 32c1bcda
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());