Loading media/libstagefright/colorconversion/SoftwareRenderer.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -164,6 +164,9 @@ void SoftwareRenderer::render( buf->stride, buf->height, 0, 0, mCropWidth - 1, mCropHeight - 1); } else if (mColorFormat == OMX_COLOR_FormatYUV420Planar) { if ((size_t)mWidth * mHeight * 3 / 2 > size) { goto skip_copying; } const uint8_t *src_y = (const uint8_t *)data; const uint8_t *src_u = (const uint8_t *)data + mWidth * mHeight; const uint8_t *src_v = src_u + (mWidth / 2 * mHeight / 2); Loading Loading @@ -193,6 +196,9 @@ void SoftwareRenderer::render( } } else { CHECK_EQ(mColorFormat, OMX_TI_COLOR_FormatYUV420PackedSemiPlanar); if ((size_t)mWidth * mHeight * 3 / 2 > size) { goto skip_copying; } const uint8_t *src_y = (const uint8_t *)data; Loading Loading @@ -228,6 +234,7 @@ void SoftwareRenderer::render( } } skip_copying: CHECK_EQ(0, mapper.unlock(buf->handle)); if ((err = mNativeWindow->queueBuffer(mNativeWindow.get(), buf, Loading Loading
media/libstagefright/colorconversion/SoftwareRenderer.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -164,6 +164,9 @@ void SoftwareRenderer::render( buf->stride, buf->height, 0, 0, mCropWidth - 1, mCropHeight - 1); } else if (mColorFormat == OMX_COLOR_FormatYUV420Planar) { if ((size_t)mWidth * mHeight * 3 / 2 > size) { goto skip_copying; } const uint8_t *src_y = (const uint8_t *)data; const uint8_t *src_u = (const uint8_t *)data + mWidth * mHeight; const uint8_t *src_v = src_u + (mWidth / 2 * mHeight / 2); Loading Loading @@ -193,6 +196,9 @@ void SoftwareRenderer::render( } } else { CHECK_EQ(mColorFormat, OMX_TI_COLOR_FormatYUV420PackedSemiPlanar); if ((size_t)mWidth * mHeight * 3 / 2 > size) { goto skip_copying; } const uint8_t *src_y = (const uint8_t *)data; Loading Loading @@ -228,6 +234,7 @@ void SoftwareRenderer::render( } } skip_copying: CHECK_EQ(0, mapper.unlock(buf->handle)); if ((err = mNativeWindow->queueBuffer(mNativeWindow.get(), buf, Loading