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

Commit 5316f999 authored by Chong Zhang's avatar Chong Zhang Committed by Android (Google) Code Review
Browse files

Merge "stagefright: return an empty array if using surface inputs" into nyc-mr1-dev

parents 790a227c e4aab106
Loading
Loading
Loading
Loading
+13 −8
Original line number Diff line number Diff line
@@ -2160,6 +2160,10 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) {
            CHECK(msg->findPointer("buffers", (void **)&dstBuffers));

            dstBuffers->clear();
            // If we're using input surface (either non-persistent created by
            // createInputSurface(), or persistent set by setInputSurface()),
            // give the client an empty input buffers array.
            if (portIndex != kPortIndexInput || !mHaveInputSurface) {
                const Vector<BufferInfo> &srcBuffers = mPortBuffers[portIndex];

                for (size_t i = 0; i < srcBuffers.size(); ++i) {
@@ -2169,6 +2173,7 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) {
                            (portIndex == kPortIndexInput && mCrypto != NULL)
                                    ? info.mEncryptedData : info.mData);
                }
            }

            (new AMessage)->postReply(replyID);
            break;