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

Commit 5572b3af authored by Andy McFadden's avatar Andy McFadden
Browse files

Replace assert with error message

The failure happens when vendor code sends EMPTY_BUFFER_DONE
twice on the same buffer.  The second time through, we see a slot
that has already been emptied, and get very confused.

This should be handled with an error, not an assertion, so we now
log a stern complaint and carry on.

Bug 11557463

Change-Id: I76e53ff08924bca81afb6980df8e59a6012ff8fe
parent fd6ecdd3
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -213,7 +213,12 @@ void GraphicBufferSource::codecBufferEmptied(OMX_BUFFERHEADERTYPE* header) {
    // see if the GraphicBuffer reference was null, which should only ever
    // happen for EOS.
    if (codecBuffer.mGraphicBuffer == NULL) {
        CHECK(mEndOfStream && mEndOfStreamSent);
        if (!(mEndOfStream && mEndOfStreamSent)) {
            // This can happen when broken code sends us the same buffer
            // twice in a row.
            ALOGE("ERROR: codecBufferEmptied on non-EOS null buffer "
                    "(buffer emptied twice?)");
        }
        // No GraphicBuffer to deal with, no additional input or output is
        // expected, so just return.
        return;