Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a8add896 authored by Vinay Kalia's avatar Vinay Kalia Committed by Steve Kondik
Browse files

libstagefright: Correcting buffer size to be allocated from ashmem.

On 8650, all buffers are allocated as one chunk.
Individual buffers returned by ashmem are 32 byte
aligned so chunk size should be allocated keeping
in mind this 32 byte alignment.

Change-Id: Idc1928dfa61b5be155baa4af443fcb5d7aee81d9
parent 1563f4ac
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1626,7 +1626,7 @@ status_t OMXCodec::allocateBuffersOnPort(OMX_U32 portIndex) {
            def.nBufferCountActual, def.nBufferSize,
            portIndex == kPortIndexInput ? "input" : "output");

    size_t totalSize = def.nBufferCountActual * def.nBufferSize;
    size_t totalSize = def.nBufferCountActual * ((def.nBufferSize + 31) & (~31));
    mDealer[portIndex] = new MemoryDealer(totalSize, "OMXCodec");

#ifdef USE_GETBUFFERINFO