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

Commit 0837d0ac authored by Lajos Molnar's avatar Lajos Molnar
Browse files

stagefright: return encrypted input buffer for secure codecs

Bug: 17630446
Change-Id: I8a9352bcd00a3f4eb6fd2797d6809a8c1edc8482
parent 7e9f7f7a
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -589,7 +589,12 @@ status_t MediaCodec::getBufferAndFormat(
    if (index < buffers->size()) {
        const BufferInfo &info = buffers->itemAt(index);
        if (info.mOwnedByClient) {
            // by the time buffers array is initialized, crypto is set
            if (portIndex == kPortIndexInput && mCrypto != NULL) {
                *buffer = info.mEncryptedData;
            } else {
                *buffer = info.mData;
            }
            *format = info.mFormat;
        }
    }