Merge "Resolving createByteBufferFromABuffer null input"

This commit is contained in:
Aaron Vaage
2015-09-08 21:33:29 +00:00
committed by Android (Google) Code Review

View File

@@ -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;
}