summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeungBeom Kim <sbcrux.kim@samsung.com>2014-10-14 08:27:10 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-14 08:27:10 +0000
commit5eb3e42ab19502d21b7235fe2693ac8ed1e8c35c (patch)
treed81075f574317a7768ee10ac578a1a6be3cbdec1
parent0d6f917983c2c5ea96245935d022287b11273a77 (diff)
parent88c954f60ea8c74f305942bc55c32bc30f6aa9ef (diff)
downloadexynos5-5eb3e42ab19502d21b7235fe2693ac8ed1e8c35c.tar.gz
am 88c954f6: remove misleading error messages: free only allocated ion buffers on exit
* commit '88c954f60ea8c74f305942bc55c32bc30f6aa9ef': remove misleading error messages: free only allocated ion buffers on exit
-rw-r--r--exynos_omx/openmax/exynos_omx/osal/Exynos_OSAL_Android.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/exynos_omx/openmax/exynos_omx/osal/Exynos_OSAL_Android.cpp b/exynos_omx/openmax/exynos_omx/osal/Exynos_OSAL_Android.cpp
index fb64735..997b926 100644
--- a/exynos_omx/openmax/exynos_omx/osal/Exynos_OSAL_Android.cpp
+++ b/exynos_omx/openmax/exynos_omx/osal/Exynos_OSAL_Android.cpp
@@ -420,9 +420,12 @@ OMX_ERRORTYPE Exynos_OSAL_RefANB_Decrease(OMX_HANDLETYPE hREF, OMX_U32 BufferFd)
for (i = 0; i < MAX_BUFFER_REF; i++) {
if (phREF->SharedBuffer[i].BufferFd == BufferFd) {
- ion_decRef(getIonFd(module), phREF->SharedBuffer[i].pIonHandle);
- ion_decRef(getIonFd(module), phREF->SharedBuffer[i].pIonHandle1);
- ion_decRef(getIonFd(module), phREF->SharedBuffer[i].pIonHandle2);
+ if (phREF->SharedBuffer[i].BufferFd > -1)
+ ion_decRef(getIonFd(module), phREF->SharedBuffer[i].pIonHandle);
+ if (phREF->SharedBuffer[i].BufferFd1 > -1)
+ ion_decRef(getIonFd(module), phREF->SharedBuffer[i].pIonHandle1);
+ if (phREF->SharedBuffer[i].BufferFd2 > -1)
+ ion_decRef(getIonFd(module), phREF->SharedBuffer[i].pIonHandle2);
phREF->SharedBuffer[i].cnt--;
if (phREF->SharedBuffer[i].cnt == 0) {
phREF->SharedBuffer[i].BufferFd = -1;