diff options
| author | 2011-07-01 14:27:37 -0700 | |
|---|---|---|
| committer | 2011-07-01 14:27:37 -0700 | |
| commit | e02dd02bb8de073e03603df240d085267f014e5a (patch) | |
| tree | f7c15ccb76e4fbb22d4c411837d2cba7ef3a08c8 | |
| parent | b5760ade49582aad4fc9a64af2544741ffd22c70 (diff) | |
| parent | 919a7ae9b4b0ab14424336d1208772f2c33299bb (diff) | |
Merge "Ignore all flush-complete notifications with port == OMX_ALL"
| -rw-r--r-- | media/libstagefright/ACodec.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp index 167071a39075..d4d07b2815d9 100644 --- a/media/libstagefright/ACodec.cpp +++ b/media/libstagefright/ACodec.cpp @@ -1190,6 +1190,17 @@ bool ACodec::BaseState::onOMXMessage(const sp<AMessage> &msg) { CHECK(msg->findInt32("data1", &data1)); CHECK(msg->findInt32("data2", &data2)); + if (event == OMX_EventCmdComplete + && data1 == OMX_CommandFlush + && data2 == (int32_t)OMX_ALL) { + // Use of this notification is not consistent across + // implementations. We'll drop this notification and rely + // on flush-complete notifications on the individual port + // indices instead. + + return true; + } + return onOMXEvent( static_cast<OMX_EVENTTYPE>(event), static_cast<OMX_U32>(data1), @@ -2119,6 +2130,7 @@ bool ACodec::ExecutingToIdleState::onOMXEvent( return BaseState::onOMXEvent(event, data1, data2); } } + void ACodec::ExecutingToIdleState::changeStateIfWeOwnAllBuffers() { if (mCodec->allYourBuffersAreBelongToUs()) { CHECK_EQ(mCodec->mOMX->sendCommand( |