am 98840f2b: Merge "media: add support for 160-byte image info in MediaCodec"

* commit '98840f2bd2fb96225ed5c95644937d55d4189ca6':
  media: add support for 160-byte image info in MediaCodec
This commit is contained in:
Lajos Molnar
2015-01-10 01:25:55 +00:00
committed by Android Git Automerger

View File

@@ -1788,11 +1788,11 @@ final public class MediaCodec {
mYOffset = yOffset; mYOffset = yOffset;
mInfo = info; mInfo = info;
// read media-info. the size of media info can be 80 or 156 depending on // read media-info. the size of media info can be 80 or 156/160 depending on
// whether it was created on a 32- or 64-bit process. See MediaImage // whether it was created on a 32- or 64-bit process. See MediaImage
if (info.remaining() == 80 || info.remaining() == 156) { if (info.remaining() == 80 || info.remaining() == 156 || info.remaining() == 160) {
boolean sizeIsLong = info.remaining() == 156; boolean sizeIsLong = info.remaining() != 80;
int type = info.getInt(); int type = readInt(info, info.remaining() == 160);
if (type != TYPE_YUV) { if (type != TYPE_YUV) {
throw new UnsupportedOperationException("unsupported type: " + type); throw new UnsupportedOperationException("unsupported type: " + type);
} }