diff options
author | Sidipotu Ashok <sashok@codeaurora.org> | 2015-10-27 23:06:22 +0530 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-11-30 15:59:14 -0800 |
commit | 742132a032ddc1dafc13f5d152ae99853ff4b69c (patch) | |
tree | 456e15b12c0c6c7bfde91517222a3954020f8d62 | |
parent | 43e8dfae5c12f7ffdd50cfdcb7d8007b1b28d898 (diff) | |
download | frameworks_av-742132a032ddc1dafc13f5d152ae99853ff4b69c.zip frameworks_av-742132a032ddc1dafc13f5d152ae99853ff4b69c.tar.gz frameworks_av-742132a032ddc1dafc13f5d152ae99853ff4b69c.tar.bz2 |
MediaCodec: reset size to zero for EOS.
testflush CTS test doesnt have logic to detect EOS
currently, reset the size to zero in Mediacodec, on
behalf of the CTS test.
CRs-Fixed: 911338
Change-Id: I31727a00e0edf5604d0409fecbd976334508e6d7
-rw-r--r-- | media/libstagefright/MediaCodec.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/media/libstagefright/MediaCodec.cpp b/media/libstagefright/MediaCodec.cpp index b6bea65..83b378f 100644 --- a/media/libstagefright/MediaCodec.cpp +++ b/media/libstagefright/MediaCodec.cpp @@ -2368,7 +2368,12 @@ status_t MediaCodec::onQueueInputBuffer(const sp<AMessage> &msg) { } if (offset + size > info->mData->capacity()) { - return -EINVAL; + if ( ((int)size == (int)-1) && !(flags & BUFFER_FLAG_EOS)) { + size = 0; + ALOGD("EOS, reset size to zero"); + } + else + return -EINVAL; } sp<AMessage> reply = info->mNotify; |