From 41e03a94962b6aec7938762b0820928f90ff3502 Mon Sep 17 00:00:00 2001 From: SeungBeom Kim Date: Wed, 16 Nov 2011 19:00:06 +0900 Subject: Patch for SEC-OMX error handling. This patch makes the SEC-OMX terminate normally. There will be no error messages(related to OMX) after applying this patch. This patch solves the OMX abnormal termination (and mediaserver crash) issue. Change-Id: I5010ffcfff6ff112c08f0a157ea290d691190134 Signed-off-by: SeungBeom Kim related-to-bug: 5364248 --- sec_mm/sec_omx/sec_omx_component/common/SEC_OMX_Basecomponent.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sec_mm') diff --git a/sec_mm/sec_omx/sec_omx_component/common/SEC_OMX_Basecomponent.c b/sec_mm/sec_omx/sec_omx_component/common/SEC_OMX_Basecomponent.c index 170600a..89e9aeb 100644 --- a/sec_mm/sec_omx/sec_omx_component/common/SEC_OMX_Basecomponent.c +++ b/sec_mm/sec_omx/sec_omx_component/common/SEC_OMX_Basecomponent.c @@ -329,6 +329,10 @@ OMX_ERRORTYPE SEC_OMX_ComponentStateSet(OMX_COMPONENTTYPE *pOMXComponent, OMX_U3 case OMX_StateLoaded: for (i = 0; i < pSECComponent->portParam.nPorts; i++) { pSECPort = (pSECComponent->pSECPort + i); + if (pSECPort == NULL) { + ret = OMX_ErrorBadParameter; + goto EXIT; + } if (CHECK_PORT_TUNNELED(pSECPort) && CHECK_PORT_BUFFER_SUPPLIER(pSECPort)) { if (CHECK_PORT_ENABLED(pSECPort)) { ret = pSECComponent->sec_AllocateTunnelBuffer(pSECPort, i); -- cgit v1.1