From 58388aa7be1c6963eb4b8464d46938ba9b0a04b0 Mon Sep 17 00:00:00 2001 From: Lajos Molnar Date: Wed, 26 Oct 2016 17:41:56 -0700 Subject: [PATCH] stagefright: remove allottedSize equality check in IOMX::useBuffer This was meant for buffers shared cross-process, but we are not gaining anything from this check even if it was at the correct place. Bug: 32436178 Change-Id: I6919e8ac6e35092273e171f49f6711ba577ba2e6 --- media/libstagefright/omx/OMXNodeInstance.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/media/libstagefright/omx/OMXNodeInstance.cpp b/media/libstagefright/omx/OMXNodeInstance.cpp index 1e76e01f11..6fc9f14599 100644 --- a/media/libstagefright/omx/OMXNodeInstance.cpp +++ b/media/libstagefright/omx/OMXNodeInstance.cpp @@ -780,13 +780,6 @@ status_t OMXNodeInstance::useBuffer( } memset(data, 0, allottedSize); - // if we are not connecting the buffers, the sizes must match - if (allottedSize != params->size()) { - CLOG_ERROR(useBuffer, BAD_VALUE, SIMPLE_BUFFER(portIndex, (size_t)allottedSize, data)); - delete[] data; - return BAD_VALUE; - } - buffer_meta = new BufferMeta( params, portIndex, false /* copyToOmx */, false /* copyFromOmx */, data); } else { -- 2.11.0