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

Commit 811bc424 authored by Andy Hung's avatar Andy Hung Committed by android-build-merger
Browse files

MediaCodecSource: Fix buffer allocation am: 01d1e525

am: 578f4e60

Change-Id: Ic0c71b9bc0a4762c30f7985de4727b690af9296f
parents 14fe7583 578f4e60
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);