OSDN Git Service

IOMX: do not clear buffer if it's allocated by component
authorChong Zhang <chz@google.com>
Mon, 19 Sep 2016 22:29:04 +0000 (15:29 -0700)
committerLajos Molnar <lajos@google.com>
Mon, 19 Sep 2016 23:25:15 +0000 (23:25 +0000)
The component might depends on their buffers to be initialized
in certain ways to work. Don't clear unless we're allocating it.

bug: 31586647
Change-Id: Ia0a125797e414998ef0cd8ce03672f5b1e0bbf7a

media/libstagefright/omx/OMXNodeInstance.cpp

index f39dc82..1221e7e 100644 (file)
@@ -907,7 +907,6 @@ status_t OMXNodeInstance::allocateBufferWithBackup(
     }
 
     CHECK_EQ(header->pAppPrivate, buffer_meta);
-    memset(header->pBuffer, 0, header->nAllocLen);
 
     *buffer = header;