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

Commit 83d7bdbc authored by Robert Shih's avatar Robert Shih Committed by android-build-merger
Browse files

Merge \\\\\\"OMXCodec: check IMemory::pointer() before using allocation\\\\\\"...

Merge \\\\\\"OMXCodec: check IMemory::pointer() before using allocation\\\\\\" into klp-dev am: f545c72b am: d89781f3 am: c9c40b82 am: 29f09eb2 am: 5d36fede
am: a17d7c03

Change-Id: If552708dbdb28fe1b744adbd92790faafbc10783
parents baba64dd a17d7c03
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1662,7 +1662,9 @@ status_t OMXCodec::allocateBuffersOnPort(OMX_U32 portIndex) {

    for (OMX_U32 i = 0; i < def.nBufferCountActual; ++i) {
        sp<IMemory> mem = mDealer[portIndex]->allocate(def.nBufferSize);
        CHECK(mem.get() != NULL);
        if (mem == NULL || mem->pointer() == NULL) {
            return NO_MEMORY;
        }

        BufferInfo info;
        info.mData = NULL;