aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyunchang Choi <hyunchang.choi@intel.com>2016-03-31 00:36:07 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-03-31 00:36:07 +0000
commit4d884c325166abf0abd76530b0380c052c88b21b (patch)
tree101b8582892412c4e3ff60f654296e1d3b390407
parent60f918a7a232576e3f77512ba729e4f9ccf49f25 (diff)
parent3e858c34513e6dfba295d3ac4768ce7ef31ceab7 (diff)
downloadwrs_omxil_core-4d884c325166abf0abd76530b0380c052c88b21b.tar.gz
media hardening: OMX::allocateBuffer must return protected buffers as native_handles
am: 3e858c3 * commit '3e858c34513e6dfba295d3ac4768ce7ef31ceab7': media hardening: OMX::allocateBuffer must return protected buffers as native_handles Change-Id: Icee4a6167ab3557ed57081effaf3c076adad4d52
-rwxr-xr-x[-rw-r--r--]base/src/componentbase.cpp5
-rwxr-xr-x[-rw-r--r--]core/inc/khronos/openmax/include/OMX_IntelIndexExt.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/base/src/componentbase.cpp b/base/src/componentbase.cpp
index e0f84c3..47d9cb0 100644..100755
--- a/base/src/componentbase.cpp
+++ b/base/src/componentbase.cpp
@@ -874,6 +874,11 @@ OMX_ERRORTYPE ComponentBase::CBaseGetExtensionIndex(
return OMX_ErrorNone;
}
+ if (!strcmp(cParameterName, "OMX.google.android.index.allocateNativeHandle")) {
+ *pIndexType = static_cast<OMX_INDEXTYPE>(OMX_IndexExtAllocateNativeHandle);
+ return OMX_ErrorNone;
+ }
+
return OMX_ErrorUnsupportedIndex;
}
diff --git a/core/inc/khronos/openmax/include/OMX_IntelIndexExt.h b/core/inc/khronos/openmax/include/OMX_IntelIndexExt.h
index c96ccb0..9e359ac 100644..100755
--- a/core/inc/khronos/openmax/include/OMX_IntelIndexExt.h
+++ b/core/inc/khronos/openmax/include/OMX_IntelIndexExt.h
@@ -74,6 +74,7 @@ typedef enum OMX_INTELINDEXEXTTYPE {
#ifdef TARGET_HAS_ISV
OMX_IndexExtVppBufferNum, /**<reference: vpp buffer number*/
#endif
+ OMX_IndexExtAllocateNativeHandle, /**<reference: AllocateNativeHandle */
OMX_IntelIndexExtMax = 0x7FFFFFFF
} OMX_INTELINDEXEXTTYPE;