summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuanjun Huang <yuanjun.huang@intel.com>2015-04-30 03:33:07 +0800
committerRonghua Wu <ronghuawu@google.com>2015-05-11 13:57:08 -0700
commit561efeaca796c47f53698038e2b527371095e0d4 (patch)
tree9b7b9ab8e5f190f71f92cf059ea080018caf36ef
parentce70dcd9a00883626adc4def15776639428625d9 (diff)
downloadutils-561efeaca796c47f53698038e2b527371095e0d4.tar.gz
isv - return OMX_ErrorInsufficientResources
when making component instance fail due to resource limitation. Bug: 20165724 Change-Id: Ic3431e68fa479ef498a54736160dc98e7de774b0
-rw-r--r--ISV/omx/isv_omxcore.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/ISV/omx/isv_omxcore.cpp b/ISV/omx/isv_omxcore.cpp
index 486fcca..4cd7238 100644
--- a/ISV/omx/isv_omxcore.cpp
+++ b/ISV/omx/isv_omxcore.cpp
@@ -210,6 +210,11 @@ OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_GetHandle(
ALOGD_IF(ISV_CORE_DEBUG, "%s: found component %s, pHandle %p", __func__, cComponentName, *pHandle);
pthread_mutex_unlock(&g_module_lock);
return OMX_ErrorNone;
+ } else if(omx_res == OMX_ErrorInsufficientResources) {
+ pthread_mutex_unlock(&g_module_lock);
+ delete pISVComponent;
+ pISVComponent = NULL;
+ return OMX_ErrorInsufficientResources;
}
}
pthread_mutex_unlock(&g_module_lock);