summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/ACodec.cpp
diff options
context:
space:
mode:
authorLajos Molnar <lajos@google.com>2013-10-04 13:18:02 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-10-04 13:18:03 +0000
commit7bab024867996bec6dc4e3e31ed4570da9afbc25 (patch)
tree402b99793fb99b4803d5a0042288f5c084f58e46 /media/libstagefright/ACodec.cpp
parent19fffcbd89a51af797265af2e11c97be5820a07d (diff)
parenta73c954d947748a3b6f630cf2c160fe55ec596e3 (diff)
downloadframeworks_av-7bab024867996bec6dc4e3e31ed4570da9afbc25.zip
frameworks_av-7bab024867996bec6dc4e3e31ed4570da9afbc25.tar.gz
frameworks_av-7bab024867996bec6dc4e3e31ed4570da9afbc25.tar.bz2
Merge "MediaCodec: avoid codec EOS if flushing during port reconfiguration" into klp-dev
Diffstat (limited to 'media/libstagefright/ACodec.cpp')
-rw-r--r--media/libstagefright/ACodec.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index 9fa8a00..1adab38 100644
--- a/media/libstagefright/ACodec.cpp
+++ b/media/libstagefright/ACodec.cpp
@@ -3066,16 +3066,17 @@ void ACodec::BaseState::onInputBufferFilled(const sp<AMessage> &msg) {
sp<ABuffer> buffer;
int32_t err = OK;
bool eos = false;
+ PortMode mode = getPortMode(kPortIndexInput);
if (!msg->findBuffer("buffer", &buffer)) {
+ /* 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);
buffer.clear();
-
- eos = true;
+ mode = KEEP_BUFFERS;
}
int32_t tmp;
@@ -3089,8 +3090,6 @@ void ACodec::BaseState::onInputBufferFilled(const sp<AMessage> &msg) {
info->mStatus = BufferInfo::OWNED_BY_US;
- PortMode mode = getPortMode(kPortIndexInput);
-
switch (mode) {
case KEEP_BUFFERS:
{