From 892e1b9ab055075ba9036fb7dd6404e9e0f2677a Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Fri, 8 Nov 2013 10:57:34 -0800 Subject: [PATCH] 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 --- media/libstagefright/omx/GraphicBufferSource.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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) { -- 2.11.0