summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWonsik Kim <wonsik@google.com>2016-07-07 16:38:55 -0700
committerJessica Wagantall <jwagantall@cyngn.com>2016-08-02 11:44:22 -0700
commit8db7a428d80e906a94de052ce226a0a532adf485 (patch)
treee81384b74211f1a5749d098b413228e7fce0b8fe
parentd81a7565853df452aaa111a13c3affbb9a05c527 (diff)
downloadandroid_hardware_qcom_media-8db7a428d80e906a94de052ce226a0a532adf485.tar.gz
android_hardware_qcom_media-8db7a428d80e906a94de052ce226a0a532adf485.tar.bz2
android_hardware_qcom_media-8db7a428d80e906a94de052ce226a0a532adf485.zip
DO NOT MERGE Fix wrong nAllocLen
Set nAllocLen to the size of the opaque handle itself. Ticket: CYNGNOS-3177 Bug: 28816964 Bug: 28816827 Change-Id: Id410e324bee291d4a0018dddb97eda9bbcded099 (cherry picked from commit 857df7fbafd5156d60df62d3ccb3cf7682b54197)
-rw-r--r--mm-video-v4l2/vidc/venc/src/omx_video_base.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/mm-video-v4l2/vidc/venc/src/omx_video_base.cpp b/mm-video-v4l2/vidc/venc/src/omx_video_base.cpp
index a3635873..005eb89b 100644
--- a/mm-video-v4l2/vidc/venc/src/omx_video_base.cpp
+++ b/mm-video-v4l2/vidc/venc/src/omx_video_base.cpp
@@ -2931,6 +2931,7 @@ OMX_ERRORTYPE omx_video::allocate_input_buffer(
//This should only be used for passing reference to source type and
//secure handle fd struct native_handle_t*
m_pInput_pmem[i].buffer = malloc(sizeof(OMX_U32) + sizeof(native_handle_t*));
+ (*bufferHdr)->nAllocLen = sizeof(OMX_U32) + sizeof(native_handle_t*);
}
(*bufferHdr)->pBuffer = (OMX_U8 *)m_pInput_pmem[i].buffer;
@@ -3099,6 +3100,7 @@ OMX_ERRORTYPE omx_video::allocate_output_buffer(
//This should only be used for passing reference to source type and
//secure handle fd struct native_handle_t*
m_pOutput_pmem[i].buffer = malloc(sizeof(OMX_U32) + sizeof(native_handle_t*));
+ (*bufferHdr)->nAllocLen = sizeof(OMX_U32) + sizeof(native_handle_t*);
native_handle_t *handle = native_handle_create(1, 0);
if(handle) {
handle->data[0] = m_pOutput_pmem[i].fd;