diff options
author | Lajos Molnar <lajos@google.com> | 2013-10-02 11:25:20 -0700 |
---|---|---|
committer | Lajos Molnar <lajos@google.com> | 2013-10-02 19:27:36 -0700 |
commit | a73c954d947748a3b6f630cf2c160fe55ec596e3 (patch) | |
tree | 8c1039cfff32735aef109da1e45e22e0f095fab6 /media/libstagefright/ACodec.cpp | |
parent | f05e50eb06d3f70e50fa7f44c1fd32128033b49d (diff) | |
download | frameworks_av-a73c954d947748a3b6f630cf2c160fe55ec596e3.zip frameworks_av-a73c954d947748a3b6f630cf2c160fe55ec596e3.tar.gz frameworks_av-a73c954d947748a3b6f630cf2c160fe55ec596e3.tar.bz2 |
MediaCodec: avoid codec EOS if flushing during port reconfiguration
Change-Id: Ic2e93f38feeb2e906f8d6b400ed6df2b7580ca87
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 11045434
Diffstat (limited to 'media/libstagefright/ACodec.cpp')
-rw-r--r-- | media/libstagefright/ACodec.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp index bfb730c..8158d70 100644 --- a/media/libstagefright/ACodec.cpp +++ b/media/libstagefright/ACodec.cpp @@ -3026,16 +3026,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; @@ -3049,8 +3050,6 @@ void ACodec::BaseState::onInputBufferFilled(const sp<AMessage> &msg) { info->mStatus = BufferInfo::OWNED_BY_US; - PortMode mode = getPortMode(kPortIndexInput); - switch (mode) { case KEEP_BUFFERS: { |