diff options
author | Edwin Wong <edwinwong@google.com> | 2012-07-10 20:01:13 -0700 |
---|---|---|
committer | Edwin Wong <edwinwong@google.com> | 2012-07-13 13:05:56 -0700 |
commit | fa2b8f243eb048fb2b8e5a14356190f69eb31a36 (patch) | |
tree | d54232d4c61bf767677bcee2373069c4969301c1 /media/libstagefright/MediaCodec.cpp | |
parent | 4221e2813f7a307936036e62b6a63bbda23005ee (diff) | |
download | frameworks_av-fa2b8f243eb048fb2b8e5a14356190f69eb31a36.zip frameworks_av-fa2b8f243eb048fb2b8e5a14356190f69eb31a36.tar.gz frameworks_av-fa2b8f243eb048fb2b8e5a14356190f69eb31a36.tar.bz2 |
Fixed sample video corrupted in MediaCodec mode.
Change-Id: I50c5660072d40f6e297e58fd026ea04c89d6a70a
related-to-bug: 6732061
Diffstat (limited to 'media/libstagefright/MediaCodec.cpp')
-rw-r--r-- | media/libstagefright/MediaCodec.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/media/libstagefright/MediaCodec.cpp b/media/libstagefright/MediaCodec.cpp index ff71170..67f5a22 100644 --- a/media/libstagefright/MediaCodec.cpp +++ b/media/libstagefright/MediaCodec.cpp @@ -1346,7 +1346,7 @@ status_t MediaCodec::onQueueInputBuffer(const sp<AMessage> &msg) { AString *errorDetailMsg; CHECK(msg->findPointer("errorDetailMsg", (void **)&errorDetailMsg)); - status_t err = mCrypto->decrypt( + ssize_t result = mCrypto->decrypt( (mFlags & kFlagIsSecure) != 0, key, iv, @@ -1357,11 +1357,11 @@ status_t MediaCodec::onQueueInputBuffer(const sp<AMessage> &msg) { info->mData->base(), errorDetailMsg); - if (err != OK) { - return err; + if (result < 0) { + return result; } - info->mData->setRange(0, size); + info->mData->setRange(0, result); } reply->setBuffer("buffer", info->mData); |