summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSejun Park <sejun79.park@samsung.com>2018-04-03 17:25:52 +0900
committerSejun Park <sejun79.park@samsung.com>2018-04-03 17:26:28 +0900
commita0191b65e43b9a2ba48eb98fc730b390a699a7d2 (patch)
treea9b1dcb3f1fdcba1fc52d18b4cee50ddd2a1400d
parent4260f1f13acd4bc68cfec250ceba279946882702 (diff)
downloadlibomxil-e3250-v4l2-tizen_4.0.tar.gz
libomxil-e3250-v4l2-tizen_4.0.tar.bz2
libomxil-e3250-v4l2-tizen_4.0.zip
Change-Id: Ieaaeabe72e5d97974909bca9bc30b86e0c6f24d9
-rwxr-xr-xexynos4/libcodec/video/v4l2/dec/ExynosVideoDecoder.c16
-rwxr-xr-xexynos4/libcodec/video/v4l2/enc/ExynosVideoEncoder.c16
2 files changed, 12 insertions, 20 deletions
diff --git a/exynos4/libcodec/video/v4l2/dec/ExynosVideoDecoder.c b/exynos4/libcodec/video/v4l2/dec/ExynosVideoDecoder.c
index 24be448..8adb7be 100755
--- a/exynos4/libcodec/video/v4l2/dec/ExynosVideoDecoder.c
+++ b/exynos4/libcodec/video/v4l2/dec/ExynosVideoDecoder.c
@@ -151,27 +151,23 @@ static void *MFC_Decoder_Init(int nMemoryType)
pCtx->nMemoryType = nMemoryType;
- pMutex = (pthread_mutex_t *)malloc(sizeof(pthread_mutex_t));
- if (pMutex == NULL) {
+ pCtx->pInMutex = (pthread_mutex_t *)malloc(sizeof(pthread_mutex_t));
+ if (pCtx->pInMutex == NULL) {
ALOGE("%s: Failed to allocate mutex about input buffer", __func__);
goto EXIT_QUERYCAP_FAIL;
}
- if (pthread_mutex_init(pMutex, NULL) != 0) {
- free(pMutex);
+ if (pthread_mutex_init(pCtx->pInMutex, NULL) != 0) {
goto EXIT_QUERYCAP_FAIL;
}
- pCtx->pInMutex = (void*)pMutex;
- pMutex = (pthread_mutex_t *)malloc(sizeof(pthread_mutex_t));
- if (pMutex == NULL) {
+ pCtx->pOutMutex = (pthread_mutex_t *)malloc(sizeof(pthread_mutex_t));
+ if (pCtx->pOutMutex == NULL) {
ALOGE("%s: Failed to allocate mutex about output buffer", __func__);
goto EXIT_QUERYCAP_FAIL;
}
- if (pthread_mutex_init(pMutex, NULL) != 0) {
- free(pMutex);
+ if (pthread_mutex_init(pCtx->pOutMutex, NULL) != 0) {
goto EXIT_QUERYCAP_FAIL;
}
- pCtx->pOutMutex = (void*)pMutex;
return (void *)pCtx;
diff --git a/exynos4/libcodec/video/v4l2/enc/ExynosVideoEncoder.c b/exynos4/libcodec/video/v4l2/enc/ExynosVideoEncoder.c
index 2851560..0469587 100755
--- a/exynos4/libcodec/video/v4l2/enc/ExynosVideoEncoder.c
+++ b/exynos4/libcodec/video/v4l2/enc/ExynosVideoEncoder.c
@@ -161,27 +161,23 @@ static void *MFC_Encoder_Init(int nMemoryType)
pCtx->nMemoryType = nMemoryType;
- pMutex = (pthread_mutex_t *)malloc(sizeof(pthread_mutex_t));
- if (pMutex == NULL) {
+ pCtx->pInMutex = (pthread_mutex_t *)malloc(sizeof(pthread_mutex_t));
+ if (pCtx->pInMutex == NULL) {
ALOGE("%s: Failed to allocate mutex about input buffer", __func__);
goto EXIT_QUERYCAP_FAIL;
}
- if (pthread_mutex_init(pMutex, NULL) != 0) {
- free(pMutex);
+ if (pthread_mutex_init(pCtx->pInMutex, NULL) != 0) {
goto EXIT_QUERYCAP_FAIL;
}
- pCtx->pInMutex = (void*)pMutex;
- pMutex = (pthread_mutex_t *)malloc(sizeof(pthread_mutex_t));
- if (pMutex == NULL) {
+ pCtx->pOutMutex = (pthread_mutex_t *)malloc(sizeof(pthread_mutex_t));
+ if (pCtx->pOutMutex == NULL) {
ALOGE("%s: Failed to allocate mutex about output buffer", __func__);
goto EXIT_QUERYCAP_FAIL;
}
- if (pthread_mutex_init(pMutex, NULL) != 0) {
- free(pMutex);
+ if (pthread_mutex_init(pCtx->pOutMutex, NULL) != 0) {
goto EXIT_QUERYCAP_FAIL;
}
- pCtx->pOutMutex = (void*)pMutex;
return (void *)pCtx;