summaryrefslogtreecommitdiffstats
path: root/sec_mm
diff options
context:
space:
mode:
authorSeungBeom Kim <sbcrux.kim@samsung.com>2010-10-24 14:04:05 -0700
committerJames Dong <jdong@google.com>2010-10-24 15:45:54 -0700
commita9cd521a0eff363c7f776392b885d252281d58f1 (patch)
tree4ef3d6f27eb8ab63f96494b7d855f8fb80a40d2c /sec_mm
parent2cd9fac4c25b45cc2b32a24d78d9baeacececec8 (diff)
downloaddevice_samsung_crespo-a9cd521a0eff363c7f776392b885d252281d58f1.zip
device_samsung_crespo-a9cd521a0eff363c7f776392b885d252281d58f1.tar.gz
device_samsung_crespo-a9cd521a0eff363c7f776392b885d252281d58f1.tar.bz2
SEC_OMX Thread Terminate Bug Fix
Bug Number : 3090226 This bug is H.263 Test player hang. Change-Id: I6c9312a18fb808803822df8f781d06cc824bfdd0 Signed-off-by: SeungBeom Kim <sbcrux.kim@samsung.com>
Diffstat (limited to 'sec_mm')
-rw-r--r--sec_mm/sec_omx/sec_omx_component/common/SEC_OMX_Basecomponent.c22
1 files changed, 16 insertions, 6 deletions
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 399be03..a761045 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
@@ -236,18 +236,27 @@ OMX_ERRORTYPE SEC_OMX_ComponentStateSet(OMX_COMPONENTTYPE *pOMXComponent, OMX_U3
pSECComponent->currentState = OMX_StateInvalid;
if (pSECComponent->hBufferProcess) {
pSECComponent->bExitBufferProcessThread = OMX_TRUE;
- SEC_OSAL_SignalSet(pSECComponent->pauseEvent);
+
for (i = 0; i < ALL_PORT_NUM; i++) {
SEC_OSAL_Get_SemaphoreCount(pSECComponent->pSECPort[i].bufferSemID, &countValue);
if (countValue == 0)
SEC_OSAL_SemaphorePost(pSECComponent->pSECPort[i].bufferSemID);
}
+
+ SEC_OSAL_SignalSet(pSECComponent->pauseEvent);
+ SEC_OSAL_ThreadTerminate(pSECComponent->hBufferProcess);
+ pSECComponent->hBufferProcess = NULL;
+
for (i = 0; i < ALL_PORT_NUM; i++) {
SEC_OSAL_MutexTerminate(pSECComponent->secDataBuffer[i].bufferMutex);
pSECComponent->secDataBuffer[i].bufferMutex = NULL;
}
- SEC_OSAL_ThreadTerminate(pSECComponent->hBufferProcess);
- pSECComponent->hBufferProcess = NULL;
+
+ SEC_OSAL_SignalTerminate(pSECComponent->pauseEvent);
+ for (i = 0; i < ALL_PORT_NUM; i++) {
+ SEC_OSAL_SemaphoreTerminate(pSECComponent->pSECPort[i].bufferSemID);
+ pSECComponent->pSECPort[i].bufferSemID = NULL;
+ }
}
if (pSECComponent->sec_mfc_componentTerminate != NULL)
pSECComponent->sec_mfc_componentTerminate(pOMXComponent);
@@ -266,14 +275,15 @@ OMX_ERRORTYPE SEC_OMX_ComponentStateSet(OMX_COMPONENTTYPE *pOMXComponent, OMX_U3
SEC_OSAL_SemaphorePost(pSECComponent->pSECPort[i].bufferSemID);
}
+ SEC_OSAL_SignalSet(pSECComponent->pauseEvent);
+ SEC_OSAL_ThreadTerminate(pSECComponent->hBufferProcess);
+ pSECComponent->hBufferProcess = NULL;
+
for (i = 0; i < ALL_PORT_NUM; i++) {
SEC_OSAL_MutexTerminate(pSECComponent->secDataBuffer[i].bufferMutex);
pSECComponent->secDataBuffer[i].bufferMutex = NULL;
}
- SEC_OSAL_SignalSet(pSECComponent->pauseEvent);
- SEC_OSAL_ThreadTerminate(pSECComponent->hBufferProcess);
- pSECComponent->hBufferProcess = NULL;
SEC_OSAL_SignalTerminate(pSECComponent->pauseEvent);
for (i = 0; i < ALL_PORT_NUM; i++) {
SEC_OSAL_SemaphoreTerminate(pSECComponent->pSECPort[i].bufferSemID);