OSDN Git Service

Back to the old way of making sure that no more buffers are submitted
authorAndreas Huber <andih@google.com>
Fri, 8 Nov 2013 18:57:34 +0000 (10:57 -0800)
committerAndreas Huber <andih@google.com>
Fri, 8 Nov 2013 18:57:34 +0000 (10:57 -0800)
to the component while in executing->idle state.

Change-Id: Ia207f0a112025ed0e2c4d62f404afbbfa694cbab
related-to-bug: 1155746311573543

media/libstagefright/omx/GraphicBufferSource.cpp

index a7c5317..b8970ad 100644 (file)
@@ -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) {