From: Taehwan Kim Date: Wed, 30 Jan 2013 00:12:09 +0000 (+0000) Subject: vdec: fixed memory type problem in DRM case X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=54865e46d74e8608f1a9e4d8ea9e8f8b014ee225;p=GitHub%2FLineageOS%2Fandroid_hardware_samsung_slsi_openmax.git vdec: fixed memory type problem in DRM case must to use the SECURE_MEMORY type in DRM case. but, the memory type has been overwritten by other condition. fixed this problem. Change-Id: I8b2f8519c09425b2355e38c81fa87ed514451c03 Signed-off-by: Taehwan Kim --- diff --git a/component/video/dec/Exynos_OMX_Vdec.c b/component/video/dec/Exynos_OMX_Vdec.c index bfc12b3..1c1f6b2 100644 --- a/component/video/dec/Exynos_OMX_Vdec.c +++ b/component/video/dec/Exynos_OMX_Vdec.c @@ -145,9 +145,6 @@ OMX_ERRORTYPE Exynos_Allocate_CodecBuffers( FunctionIn(); - if (pVideoDec->bDRMPlayerMode == OMX_TRUE) - eMemoryType = SECURE_MEMORY; - if (nPortIndex == INPUT_PORT_INDEX) { ppCodecBuffer = &(pVideoDec->pMFCDecInputBuffer[0]); nPlaneCnt = MFC_INPUT_BUFFER_PLANE; @@ -159,6 +156,9 @@ OMX_ERRORTYPE Exynos_Allocate_CodecBuffers( #endif } + if (pVideoDec->bDRMPlayerMode == OMX_TRUE) + eMemoryType = SECURE_MEMORY; + for (i = 0; i < nBufferCnt; i++) { ppCodecBuffer[i] = (CODEC_DEC_BUFFER *)Exynos_OSAL_Malloc(sizeof(CODEC_DEC_BUFFER)); if (ppCodecBuffer[i] == NULL) {