summaryrefslogtreecommitdiffstats
path: root/domx
diff options
context:
space:
mode:
authorPrasanna Kumar M.R <prasanna.kumarmr@ti.com>2012-07-19 11:03:08 -0500
committerPrasanna Kumar M.R <prasanna.kumarmr@ti.com>2012-07-20 10:20:32 -0500
commit05b2b4fc91884f89bdeafa36f608e332200aa5c0 (patch)
tree976b29dffc3e7a62041a1c49580f25e3a3fea005 /domx
parentdb82a7487123efed36f6aa6b5fc3a2ec43b537b1 (diff)
downloadhardware_ti_omap4-05b2b4fc91884f89bdeafa36f608e332200aa5c0.zip
hardware_ti_omap4-05b2b4fc91884f89bdeafa36f608e332200aa5c0.tar.gz
hardware_ti_omap4-05b2b4fc91884f89bdeafa36f608e332200aa5c0.tar.bz2
DOMX: Fix to release the shared ion buffer
In secure playback case, we dont map the ion buffers. We allocate the buffer and perform ion share to share it across to other components. In this case, we also need to close the fd inadditional to the existing ion free call inorder to ensure that buffer gets released as otherwise the reference count is still valid in ion driver and is not freed. Change-Id: I621077e132af55ada2a5ab0c7f4a01ed7afc7d02 Signed-off-by: Prasanna Kumar M.R. <prasanna.kumarmr@ti.com>
Diffstat (limited to 'domx')
-rw-r--r--domx/omx_proxy_common/src/omx_proxy_common.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/domx/omx_proxy_common/src/omx_proxy_common.c b/domx/omx_proxy_common/src/omx_proxy_common.c
index f45aa28..bf40d8f 100644
--- a/domx/omx_proxy_common/src/omx_proxy_common.c
+++ b/domx/omx_proxy_common/src/omx_proxy_common.c
@@ -1236,10 +1236,14 @@ OMX_ERRORTYPE PROXY_FreeBuffer(OMX_IN OMX_HANDLETYPE hComponent,
{
if (pCompPrv->bUseIon == OMX_TRUE)
{
- if(pCompPrv->bMapIonBuffers == OMX_TRUE && pBufferHdr->pBuffer)
+ if(pBufferHdr->pBuffer)
{
- munmap(pBufferHdr->pBuffer, pBufferHdr->nAllocLen);
- close(pCompPrv->tBufList[count].mmap_fd);
+ if(pCompPrv->bMapIonBuffers == OMX_TRUE)
+ {
+ munmap(pBufferHdr->pBuffer, pBufferHdr->nAllocLen);
+ }
+ //Perform close for ion map as well as ion share buffers
+ close(pCompPrv->tBufList[count].mmap_fd);
}
ion_free(pCompPrv->ion_fd, pCompPrv->tBufList[count].pYBuffer);
pCompPrv->tBufList[count].pYBuffer = NULL;