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

Commit 2715aa16 authored by Andy Hung's avatar Andy Hung Committed by android-build-merger
Browse files

MediaCodecSource: Fix buffer allocation am: 01d1e525 am: 578f4e60

am: 811bc424

Change-Id: I28ff5f5f8f75d47974c4fbe7849c4e1750e7fd9e
parents 4e1fe188 811bc424
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -860,6 +860,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)) {
@@ -913,7 +914,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);