Merge "Back to the old way of making sure that no more buffers are submitted" into klp-dev
diff --git a/media/libstagefright/omx/GraphicBufferSource.cpp b/media/libstagefright/omx/GraphicBufferSource.cpp
index a7c5317..b8970ad 100644
--- a/media/libstagefright/omx/GraphicBufferSource.cpp
+++ b/media/libstagefright/omx/GraphicBufferSource.cpp
@@ -156,7 +156,7 @@
     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::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) {