Bug 1065492 - Fix a stride when using android::ColorConverter r=nical

This commit is contained in:
Sotaro Ikeda 2014-09-15 06:30:40 -07:00
parent f993413c13
commit c42f61231c

View File

@ -351,9 +351,10 @@ ConvertOmxYUVFormatToRGB565(android::sp<GraphicBuffer>& aBuffer,
return BAD_VALUE;
}
uint32_t pixelStride = aMappedSurface->mStride/gfx::BytesPerPixel(gfx::SurfaceFormat::R5G6B5);
rv = colorConverter.convert(buffer, width, height,
0, 0, width - 1, height - 1 /* source crop */,
aMappedSurface->mData, width, height,
aMappedSurface->mData, pixelStride, height,
0, 0, width - 1, height - 1 /* dest crop */);
if (rv) {
NS_WARNING("OMX color conversion failed");