diff options
author | Lajos Molnar <lajos@google.com> | 2015-01-10 01:10:23 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-01-10 01:10:24 +0000 |
commit | 98840f2bd2fb96225ed5c95644937d55d4189ca6 (patch) | |
tree | 21e6e33ab8a2428deb62725d563d8d3985acfe2b /media | |
parent | 9a6c45eedd112313e5b24111f23bc309a3dc5df6 (diff) | |
parent | cea639cf3f9ee6f851045fb0a25429dfa23fed39 (diff) | |
download | frameworks_base-98840f2bd2fb96225ed5c95644937d55d4189ca6.zip frameworks_base-98840f2bd2fb96225ed5c95644937d55d4189ca6.tar.gz frameworks_base-98840f2bd2fb96225ed5c95644937d55d4189ca6.tar.bz2 |
Merge "media: add support for 160-byte image info in MediaCodec"
Diffstat (limited to 'media')
-rw-r--r-- | media/java/android/media/MediaCodec.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/media/java/android/media/MediaCodec.java b/media/java/android/media/MediaCodec.java index 420510a..74fc2c5 100644 --- a/media/java/android/media/MediaCodec.java +++ b/media/java/android/media/MediaCodec.java @@ -1788,11 +1788,11 @@ final public class MediaCodec { mYOffset = yOffset; 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 - if (info.remaining() == 80 || info.remaining() == 156) { - boolean sizeIsLong = info.remaining() == 156; - int type = info.getInt(); + if (info.remaining() == 80 || info.remaining() == 156 || info.remaining() == 160) { + boolean sizeIsLong = info.remaining() != 80; + int type = readInt(info, info.remaining() == 160); if (type != TYPE_YUV) { throw new UnsupportedOperationException("unsupported type: " + type); } |