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

Commit 56abfa5c authored by Aaron Vaage's avatar Aaron Vaage Committed by Android (Google) Code Review
Browse files

Merge "Resolving createByteBufferFromABuffer null input"

parents 83038718 e5b641e6
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -440,6 +440,12 @@ status_t JMediaCodec::createByteBufferFromABuffer(
    // if this is an ABuffer that doesn't actually hold any accessible memory,
    // use a null ByteBuffer
    *buf = NULL;

    if (buffer == NULL) {
        ALOGV("createByteBufferFromABuffer - given NULL, returning NULL");
        return OK;
    }

    if (buffer->base() == NULL) {
        return OK;
    }