diff options
author | Lajos Molnar <lajos@google.com> | 2013-11-04 21:53:21 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-11-04 21:53:21 -0800 |
commit | 2922d230155cb1be7acc0c11bef6f0ca0345bdb7 (patch) | |
tree | 77f2b37c0e90ec5fc724149352d84c3a2d68ee88 | |
parent | 4cf799fbbb74de102d34ccb014ba7fbd9bfa5e14 (diff) | |
parent | 065789f24890b0a9f3614dc175e6f7664af1f2ce (diff) | |
download | frameworks_av-2922d230155cb1be7acc0c11bef6f0ca0345bdb7.zip frameworks_av-2922d230155cb1be7acc0c11bef6f0ca0345bdb7.tar.gz frameworks_av-2922d230155cb1be7acc0c11bef6f0ca0345bdb7.tar.bz2 |
am 065789f2: Merge "Restore NuPlayer error and EOS handling" into klp-dev
* commit '065789f24890b0a9f3614dc175e6f7664af1f2ce':
Restore NuPlayer error and EOS handling
-rw-r--r-- | media/libstagefright/ACodec.cpp | 11 | ||||
-rw-r--r-- | media/libstagefright/MediaCodec.cpp | 3 |
2 files changed, 10 insertions, 4 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp index 1adab38..92a5361 100644 --- a/media/libstagefright/ACodec.cpp +++ b/media/libstagefright/ACodec.cpp @@ -3072,11 +3072,16 @@ void ACodec::BaseState::onInputBufferFilled(const sp<AMessage> &msg) { /* these are unfilled buffers returned by client */ CHECK(msg->findInt32("err", &err)); - ALOGV("[%s] saw error %d instead of an input buffer", - mCodec->mComponentName.c_str(), err); + if (err == OK) { + /* buffers with no errors are returned on MediaCodec.flush */ + mode = KEEP_BUFFERS; + } else { + ALOGV("[%s] saw error %d instead of an input buffer", + mCodec->mComponentName.c_str(), err); + eos = true; + } buffer.clear(); - mode = KEEP_BUFFERS; } int32_t tmp; diff --git a/media/libstagefright/MediaCodec.cpp b/media/libstagefright/MediaCodec.cpp index e299caf..8af1aaf 100644 --- a/media/libstagefright/MediaCodec.cpp +++ b/media/libstagefright/MediaCodec.cpp @@ -1506,7 +1506,8 @@ void MediaCodec::returnBuffersToCodecOnPort(int32_t portIndex) { info->mOwnedByClient = false; if (portIndex == kPortIndexInput) { - msg->setInt32("err", ERROR_END_OF_STREAM); + /* no error, just returning buffers */ + msg->setInt32("err", OK); } msg->post(); } |