diff options
author | James Dong <jdong@google.com> | 2010-02-17 17:53:58 -0800 |
---|---|---|
committer | James Dong <jdong@google.com> | 2010-02-17 17:54:45 -0800 |
commit | a7d8550490e7973b12ab6aed936182ce30f882a1 (patch) | |
tree | b79619a761904a445402665758dc4b0ac8101777 | |
parent | eea0f5bab106ef9139fb7e5e931263907e52eaa4 (diff) | |
download | omap3-a7d8550490e7973b12ab6aed936182ce30f882a1.tar.gz |
Fix buffer ownership and buffer count when write fails
Originally from MOT/TI
Modified to add fix for the buffer count as well
-rw-r--r-- | omx/video/src/openmax_il/video_decode/src/OMX_VideoDec_Utils.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/omx/video/src/openmax_il/video_decode/src/OMX_VideoDec_Utils.c b/omx/video/src/openmax_il/video_decode/src/OMX_VideoDec_Utils.c index 611bb2c..c6d35a1 100644 --- a/omx/video/src/openmax_il/video_decode/src/OMX_VideoDec_Utils.c +++ b/omx/video/src/openmax_il/video_decode/src/OMX_VideoDec_Utils.c @@ -5837,6 +5837,8 @@ OMX_ERRORTYPE VIDDEC_HandleDataBuf_FromApp(VIDDEC_COMPONENT_PRIVATE *pComponentP ret = write(pComponentPrivate->free_inpBuf_Q[1], &pBuffHead, sizeof(pBuffHead)); if(ret == -1){ OMX_PRCOMM4(pComponentPrivate->dbg, "writing to the input pipe %x (%d)\n", OMX_ErrorInsufficientResources,ret); + pBufferPrivate->eBufferOwner = VIDDEC_BUFFER_WITH_DSP; + DecrementCount (&(pComponentPrivate->nCountInputBFromDsp), &(pComponentPrivate->mutexInputBFromDSP)); pComponentPrivate->cbInfo.EventHandler(pComponentPrivate->pHandle, pComponentPrivate->pHandle->pApplicationPrivate, OMX_EventError, @@ -6412,13 +6414,14 @@ OMX_ERRORTYPE VIDDEC_HandleDataBuf_FromApp(VIDDEC_COMPONENT_PRIVATE *pComponentP ret = write(pComponentPrivate->free_inpBuf_Q[1], &pBuffHead, sizeof(pBuffHead)); if(ret == -1){ OMX_PRCOMM4(pComponentPrivate->dbg, "writing to the input pipe %x (%d)\n", OMX_ErrorInsufficientResources,ret); + pBufferPrivate->eBufferOwner = VIDDEC_BUFFER_WITH_DSP; + DecrementCount (&(pComponentPrivate->nCountInputBFromDsp), &(pComponentPrivate->mutexInputBFromDSP)); pComponentPrivate->cbInfo.EventHandler(pComponentPrivate->pHandle, pComponentPrivate->pHandle->pApplicationPrivate, OMX_EventError, OMX_ErrorInsufficientResources, OMX_TI_ErrorSevere, "Error writing to the output pipe"); - DecrementCount (&(pComponentPrivate->nCountInputBFromDsp), &(pComponentPrivate->mutexInputBFromDSP)); } } } |