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

Commit 22990fe1 authored by Andreas Huber's avatar Andreas Huber Committed by Android (Google) Code Review
Browse files

Merge "Back to the old way of making sure that no more buffers are submitted" into klp-dev

parents 184dfe4e 892e1b9a
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -156,7 +156,7 @@ void GraphicBufferSource::omxIdle() {
    if (mExecuting) {
        // We are only interested in the transition from executing->idle,
        // not loaded->idle.
        mEndOfStream = mEndOfStreamSent = true;
        mExecuting = false;
    }
}

@@ -206,7 +206,9 @@ void GraphicBufferSource::addCodecBuffer(OMX_BUFFERHEADERTYPE* header) {
void GraphicBufferSource::codecBufferEmptied(OMX_BUFFERHEADERTYPE* header) {
    Mutex::Autolock autoLock(mMutex);

    CHECK(mExecuting);  // could this happen if app stop()s early?
    if (!mExecuting) {
        return;
    }

    int cbi = findMatchingCodecBuffer_l(header);
    if (cbi < 0) {