From: Andreas Huber Date: Fri, 8 Nov 2013 18:57:34 +0000 (-0800) Subject: Back to the old way of making sure that no more buffers are submitted X-Git-Tag: android-x86-4.4-r1~24^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=892e1b9ab055075ba9036fb7dd6404e9e0f2677a;p=android-x86%2Fframeworks-av.git Back to the old way of making sure that no more buffers are submitted to the component while in executing->idle state. Change-Id: Ia207f0a112025ed0e2c4d62f404afbbfa694cbab related-to-bug: 11557463, 11573543 --- diff --git a/media/libstagefright/omx/GraphicBufferSource.cpp b/media/libstagefright/omx/GraphicBufferSource.cpp index a7c5317211..b8970adab3 100644 --- a/media/libstagefright/omx/GraphicBufferSource.cpp +++ b/media/libstagefright/omx/GraphicBufferSource.cpp @@ -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) {