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

Commit 054ad5b3 authored by Zach Jang's avatar Zach Jang Committed by Android (Google) Code Review
Browse files

Merge "MediaCodecSource: Fix buffer allocation" into nyc-mr1-dev

parents 984be931 01d1e525
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -859,6 +859,7 @@ void MediaCodecSource::onMessageReceived(const sp<AMessage> &msg) {
            }

            MediaBuffer *mbuf = new MediaBuffer(outbuf->size());
            mbuf->setObserver(this);
            mbuf->add_ref();

            if (!(flags & MediaCodec::BUFFER_FLAG_CODECCONFIG)) {
@@ -911,7 +912,6 @@ void MediaCodecSource::onMessageReceived(const sp<AMessage> &msg) {
                mbuf->meta_data()->setInt32(kKeyIsSyncFrame, true);
            }
            memcpy(mbuf->data(), outbuf->data(), outbuf->size());
            mbuf->setObserver(this);

            {
                Mutexed<Output>::Locked output(mOutput);