mm-video-v4l2: venc: Avoid buffer access after free am: b701fb182b am: 6533d3dd97 am: 2d39f9e2b0

am: 9086e5116a

Change-Id: Ib3e4e55e67f23eb88c4fcc8f0f7dfa5d71886976
This commit is contained in:
Santhosh Behara 2017-10-10 21:48:39 +00:00 committed by android-build-merger
commit 2684efbc38
1 changed files with 0 additions and 2 deletions

View File

@ -2659,7 +2659,6 @@ OMX_ERRORTYPE omx_video::use_output_buffer(
return OMX_ErrorBadParameter;
}
auto_lock l(m_buf_lock);
if (!m_out_mem_ptr) {
output_use_buffer = true;
int nBufHdrSize = 0;
@ -3585,7 +3584,6 @@ OMX_ERRORTYPE omx_video::free_buffer(OMX_IN OMX_HANDLETYPE hComp,
nPortIndex, (unsigned int)m_sOutPortDef.nBufferCountActual);
if (nPortIndex < m_sOutPortDef.nBufferCountActual &&
BITMASK_PRESENT(&m_out_bm_count, nPortIndex)) {
auto_lock l(m_buf_lock);
// Clear the bit associated with it.
BITMASK_CLEAR(&m_out_bm_count,nPortIndex);
m_sOutPortDef.bPopulated = OMX_FALSE;