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

Commit 30921d67 authored by Lajos Molnar's avatar Lajos Molnar Committed by android-build-merger
Browse files

stagefright: don't actually acquire graphic buffer when we don't want to am: 02cccfd9

am: 99eb0f8d

Change-Id: Ibbcb2ac881a9dca5c0074cbeb0dd467d7bb7f8e7
parents b5ef3889 99eb0f8d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -898,7 +898,7 @@ void GraphicBufferSource::onFrameAvailable(const BufferItem& item __unused) {
    ++mNumAvailableUnacquiredBuffers;

    // For BufferQueue we cannot acquire a buffer if we cannot immediately feed it to the codec
    // OR we are discarding this buffer (acquiring and immediately releasing it), which makes
    // UNLESS we are discarding this buffer (acquiring and immediately releasing it), which makes
    // this an ugly logic.
    // NOTE: We could also rely on our debug counter but that is meant only as a debug counter.
    if (!areWeDiscardingAvailableBuffers_l() && mFreeCodecBuffers.empty()) {
@@ -907,6 +907,7 @@ void GraphicBufferSource::onFrameAvailable(const BufferItem& item __unused) {
        ALOGV("onFrameAvailable: cannot acquire buffer right now, do it later");

        ++mRepeatLastFrameGeneration; // cancel any pending frame repeat
        return;
    }

    VideoBuffer buffer;