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

Commit 4c161506 authored by Jeff Tinker's avatar Jeff Tinker
Browse files

Fix mmap size 0 errors

ACodecBufferChannel was attempting to create a MemoryDealer
with zero size, which resulting in mmap failures.  This was
causing the ExoPlayer GTS test to fail to complete due to
the Drm HAL being blocked in createPlugin.

Test: run gts -m GtsExoPlayerTestCases

bug:36870961
Change-Id: I0945e95565ea4ef05e53fb13cf5ddbba43f27173
parent 8d8ebcaa
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -300,9 +300,11 @@ void ACodecBufferChannel::setInputBufferArray(const std::vector<BufferAndId> &ar
                });
        size_t destinationBufferSize = maxSize;
        size_t heapSize = totalSize + destinationBufferSize;
        if (heapSize > 0) {
            mDealer = makeMemoryDealer(heapSize);
            mDecryptDestination = mDealer->allocate(destinationBufferSize);
        }
    }
    std::vector<const BufferInfo> inputBuffers;
    for (const BufferAndId &elem : array) {
        sp<IMemory> sharedEncryptedBuffer;