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
diff --git a/media/libstagefright/omx/GraphicBufferSource.cpp b/media/libstagefright/omx/GraphicBufferSource.cpp
index f295e5a..7d45386 100644
--- a/media/libstagefright/omx/GraphicBufferSource.cpp
+++ b/media/libstagefright/omx/GraphicBufferSource.cpp
@@ -213,7 +213,12 @@
     // 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;