From: Ethan Chen Date: Wed, 12 Aug 2015 01:18:47 +0000 (-0700) Subject: osal: Fix OSAL lock ANB type casting X-Git-Url: https://git.stricted.de/?p=GitHub%2FLineageOS%2Fandroid_hardware_samsung_slsi_openmax.git;a=commitdiff_plain;h=refs%2Fheads%2Fcm-12.1 osal: Fix OSAL lock ANB type casting * commit 9d7f3c9550db35b835be9ca679befbca171c0333 picked the original change incorrectly resulting in the useAndroidNativeBuffer function passing a pBuffer into a function expecting a buffer_handle_t. This would cause CSC to crash when converting video frames. Change-Id: Ia0270d93558f682d64d830643aba43295414dba1 --- diff --git a/osal/Exynos_OSAL_Android.cpp b/osal/Exynos_OSAL_Android.cpp index 8a8a86c..9b7ec6a 100644 --- a/osal/Exynos_OSAL_Android.cpp +++ b/osal/Exynos_OSAL_Android.cpp @@ -220,12 +220,11 @@ OMX_ERRORTYPE useAndroidNativeBuffer( for (i = 0; i < pExynosPort->portDefinition.nBufferCountActual; i++) { if (pExynosPort->bufferStateAllocate[i] == BUFFER_STATE_FREE) { - OMX_U32 stride; - pExynosPort->extendBufferHeader[i].OMXBufferHeader = temp_bufferHeader; pExynosPort->bufferStateAllocate[i] = (BUFFER_STATE_ASSIGNED | HEADER_STATE_ALLOCATED); INIT_SET_SIZE_VERSION(temp_bufferHeader, OMX_BUFFERHEADERTYPE); - temp_bufferHeader->pBuffer = pBuffer; + android_native_buffer_t *pANB = (android_native_buffer_t *) pBuffer; + temp_bufferHeader->pBuffer = (OMX_U8 *)pANB->handle; temp_bufferHeader->nAllocLen = nSizeBytes; temp_bufferHeader->pAppPrivate = pAppPrivate; if (nPortIndex == INPUT_PORT_INDEX)