diff options
author | Zach Pfeffer <zach.pfeffer@linaro.org> | 2011-12-14 22:13:09 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@betelgeuse.canonical.com> | 2011-12-14 22:13:09 +0000 |
commit | 3473d372b105d0749cd62abfbcc6e08fcb57f3a3 (patch) | |
tree | a9e1c973a73b1cdb09d96bdbf0ca17ca426d6544 | |
parent | 9f8d83d568b5080f6e73789d92cd668c4c3c3a77 (diff) | |
parent | 579543928af18e2db155749dc62979120881c2d2 (diff) | |
download | base-3473d372b105d0749cd62abfbcc6e08fcb57f3a3.tar.gz |
Merge "Stagefright: Fix thumbnail generation crashes" into linaro_android_4.0.1
-rwxr-xr-x | media/libstagefright/OMXCodec.cpp | 8 | ||||
-rw-r--r-- | media/libstagefright/omx/SimpleSoftOMXComponent.cpp | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp index b20bfcb73ae7..4e7602f826ef 100755 --- a/media/libstagefright/OMXCodec.cpp +++ b/media/libstagefright/OMXCodec.cpp @@ -2175,8 +2175,12 @@ int64_t OMXCodec::retrieveDecodingTimeUs(bool isCodecSpecific) { void OMXCodec::on_message(const omx_message &msg) { if (mState == ERROR) { - LOGW("Dropping OMX message - we're in ERROR state."); - return; + if (msg.type != omx_message::EMPTY_BUFFER_DONE) { + LOGW("Dropping OMX message - we're in ERROR state."); + return; + } + LOGI("In ERROR state but allowing EMPTY_BUFFER_DONE in order to get " \ + "back input buffers before closing down."); } switch (msg.type) { diff --git a/media/libstagefright/omx/SimpleSoftOMXComponent.cpp b/media/libstagefright/omx/SimpleSoftOMXComponent.cpp index b705d00d9e7f..24208ab37fa4 100644 --- a/media/libstagefright/omx/SimpleSoftOMXComponent.cpp +++ b/media/libstagefright/omx/SimpleSoftOMXComponent.cpp @@ -425,7 +425,7 @@ void SimpleSoftOMXComponent::onChangeState(OMX_STATETYPE state) { CHECK_EQ((int)state, (int)OMX_StateIdle); break; case OMX_StateIdle: - CHECK(state == OMX_StateLoaded || state == OMX_StateExecuting); + CHECK(state == OMX_StateLoaded || state == OMX_StateIdle || state == OMX_StateExecuting); break; case OMX_StateExecuting: { |