diff options
5 files changed, 8 insertions, 25 deletions
diff --git a/videocodec/securevideo/baytrail/OMXVideoDecoderAVCSecure.cpp b/videocodec/securevideo/baytrail/OMXVideoDecoderAVCSecure.cpp index 3b980ed..453a680 100644 --- a/videocodec/securevideo/baytrail/OMXVideoDecoderAVCSecure.cpp +++ b/videocodec/securevideo/baytrail/OMXVideoDecoderAVCSecure.cpp @@ -405,11 +405,7 @@ void OMXVideoDecoderAVCSecure::MemFreeSecure(OMX_U8 *pBuffer, OMX_PTR pUserData) } OMX_U8* OMXVideoDecoderAVCSecure::MemAllocSecure(OMX_U32 nSizeBytes) { - if (nSizeBytes > INPORT_BUFFER_SIZE) { - LOGE("Invalid size (%lu) of memory to allocate.", nSizeBytes); - return NULL; - } - LOGW_IF(nSizeBytes != INPORT_BUFFER_SIZE, "WARNING: MemAllocSEC asked to allocate buffer of size %lu (expected %d)", nSizeBytes, INPORT_BUFFER_SIZE); + // Ignore passed nSizeBytes, use INPORT_BUFFER_SIZE instead uint32_t index = 0; do { diff --git a/videocodec/securevideo/cherrytrail/OMXVideoDecoderAVCSecure.cpp b/videocodec/securevideo/cherrytrail/OMXVideoDecoderAVCSecure.cpp index 583eed2..de920b8 100644 --- a/videocodec/securevideo/cherrytrail/OMXVideoDecoderAVCSecure.cpp +++ b/videocodec/securevideo/cherrytrail/OMXVideoDecoderAVCSecure.cpp @@ -405,11 +405,7 @@ void OMXVideoDecoderAVCSecure::MemFreeSecure(OMX_U8 *pBuffer, OMX_PTR pUserData) } OMX_U8* OMXVideoDecoderAVCSecure::MemAllocSecure(OMX_U32 nSizeBytes) { - if (nSizeBytes > INPORT_BUFFER_SIZE) { - LOGE("Invalid size (%lu) of memory to allocate.", nSizeBytes); - return NULL; - } - LOGW_IF(nSizeBytes != INPORT_BUFFER_SIZE, "WARNING: MemAllocSEC asked to allocate buffer of size %lu (expected %d)", nSizeBytes, INPORT_BUFFER_SIZE); + // Ignore passed nSizeBytes, use INPORT_BUFFER_SIZE instead uint32_t index = 0; do { diff --git a/videocodec/securevideo/ctp/OMXVideoDecoderAVCSecure.cpp b/videocodec/securevideo/ctp/OMXVideoDecoderAVCSecure.cpp index abaf120..dda7026 100644 --- a/videocodec/securevideo/ctp/OMXVideoDecoderAVCSecure.cpp +++ b/videocodec/securevideo/ctp/OMXVideoDecoderAVCSecure.cpp @@ -372,11 +372,8 @@ void OMXVideoDecoderAVCSecure::MemFreeIMR(OMX_U8 *pBuffer, OMX_PTR pUserData) { } OMX_U8* OMXVideoDecoderAVCSecure::MemAllocIMR(OMX_U32 nSizeBytes) { - if (nSizeBytes > INPORT_BUFFER_SIZE) { - LOGE("Invalid size (%lu) of memory to allocate.", nSizeBytes); - return NULL; - } - LOGW_IF(nSizeBytes != INPORT_BUFFER_SIZE, "Size of memory to allocate is %lu", nSizeBytes); + // Ignore passed nSizeBytes, use INPORT_BUFFER_SIZE instead + for (int i = 0; i < INPORT_ACTUAL_BUFFER_COUNT; i++) { if (mIMRSlot[i].owner == NULL) { IMRDataBuffer *pBuffer = new IMRDataBuffer; diff --git a/videocodec/securevideo/merrifield/OMXVideoDecoderAVCSecure.cpp b/videocodec/securevideo/merrifield/OMXVideoDecoderAVCSecure.cpp index 590c9ea..2d1d2a4 100644 --- a/videocodec/securevideo/merrifield/OMXVideoDecoderAVCSecure.cpp +++ b/videocodec/securevideo/merrifield/OMXVideoDecoderAVCSecure.cpp @@ -387,11 +387,8 @@ void OMXVideoDecoderAVCSecure::MemFreeIMR(OMX_U8 *pBuffer, OMX_PTR pUserData) { } OMX_U8* OMXVideoDecoderAVCSecure::MemAllocIMR(OMX_U32 nSizeBytes) { - if (nSizeBytes > INPORT_BUFFER_SIZE) { - LOGE("Invalid size (%lu) of memory to allocate.", nSizeBytes); - return NULL; - } - LOGW_IF(nSizeBytes != INPORT_BUFFER_SIZE, "Size of memory to allocate is %lu", nSizeBytes); + // Ignore passed nSizeBytes, use INPORT_BUFFER_SIZE instead + for (int i = 0; i < INPORT_ACTUAL_BUFFER_COUNT; i++) { if (mIMRSlot[i].owner == NULL) { IMRDataBuffer *pBuffer = new IMRDataBuffer; diff --git a/videocodec/securevideo/merrplus/OMXVideoDecoderAVCSecure.cpp b/videocodec/securevideo/merrplus/OMXVideoDecoderAVCSecure.cpp index 590c9ea..2d1d2a4 100644 --- a/videocodec/securevideo/merrplus/OMXVideoDecoderAVCSecure.cpp +++ b/videocodec/securevideo/merrplus/OMXVideoDecoderAVCSecure.cpp @@ -387,11 +387,8 @@ void OMXVideoDecoderAVCSecure::MemFreeIMR(OMX_U8 *pBuffer, OMX_PTR pUserData) { } OMX_U8* OMXVideoDecoderAVCSecure::MemAllocIMR(OMX_U32 nSizeBytes) { - if (nSizeBytes > INPORT_BUFFER_SIZE) { - LOGE("Invalid size (%lu) of memory to allocate.", nSizeBytes); - return NULL; - } - LOGW_IF(nSizeBytes != INPORT_BUFFER_SIZE, "Size of memory to allocate is %lu", nSizeBytes); + // Ignore passed nSizeBytes, use INPORT_BUFFER_SIZE instead + for (int i = 0; i < INPORT_ACTUAL_BUFFER_COUNT; i++) { if (mIMRSlot[i].owner == NULL) { IMRDataBuffer *pBuffer = new IMRDataBuffer; |
