diff options
author | Lajos Molnar <lajos@google.com> | 2014-11-26 12:09:56 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-11-26 12:09:56 +0000 |
commit | fdc9e9de0823ae9a78913051c81d2bb8dd9159e5 (patch) | |
tree | 9d264e2010aa77ae1865a098c3b5d322b1ead27e | |
parent | 5ff0e5fb6b339a7dea0cbc344e88673b7a99e593 (diff) | |
parent | d4604b4fd370fa54d94ec94e6137b093f9f3da8c (diff) | |
download | frameworks_base-fdc9e9de0823ae9a78913051c81d2bb8dd9159e5.zip frameworks_base-fdc9e9de0823ae9a78913051c81d2bb8dd9159e5.tar.gz frameworks_base-fdc9e9de0823ae9a78913051c81d2bb8dd9159e5.tar.bz2 |
am d4604b4f: am c60a5d78: am 3ed95fe2: Merge "media: add support for 160-byte image info in MediaCodec" into lmp-mr1-dev
* commit 'd4604b4fd370fa54d94ec94e6137b093f9f3da8c':
media: add support for 160-byte image info in MediaCodec
-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 bdd62f2..8985b52 100644 --- a/media/java/android/media/MediaCodec.java +++ b/media/java/android/media/MediaCodec.java @@ -1784,11 +1784,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); } |