vdec: fixed memory type problem in DRM case
authorTaehwan Kim <t_h.kim@samsung.com>
Wed, 30 Jan 2013 00:12:09 +0000 (00:12 +0000)
committerTaehwan Kim <t_h.kim@samsung.com>
Wed, 30 Jan 2013 07:38:56 +0000 (07:38 +0000)
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 <t_h.kim@samsung.com>
component/video/dec/Exynos_OMX_Vdec.c

index bfc12b364c957452c4c015c0e567c4919abe9179..1c1f6b2b2d8df491b1be8214e18abe1f32d690f0 100644 (file)
@@ -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) {