Bug fix, use data height/width to check input size

git-svn-id: https://zxing.googlecode.com/svn/trunk@1120 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2009-11-22 15:24:29 +00:00
parent 87b6b0ec66
commit 5339ef7757

View file

@ -38,8 +38,9 @@ public final class PlanarYUV420LuminanceSource extends AbstractPlanarYUVLuminanc
int width = getWidth();
int height = getHeight();
int dataWidth = getDataWidth();
int dataHeight = getDataHeight();
byte[] yuv = getYUVData();
int expectedYBytes = width * height;
int expectedYBytes = dataWidth * dataHeight;
int expectedUBytes = expectedYBytes >> 2;
int expectedVBytes = expectedYBytes >> 2;
int expectedBytes = expectedYBytes + expectedUBytes + expectedVBytes;