From: Andreas Huber Date: Fri, 1 Jul 2011 20:13:02 +0000 (-0700) Subject: Ignore all flush-complete notifications with port == OMX_ALL X-Git-Tag: android-x86-4.4-r1~1579^2~699^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=0af941927ef8f35f2da5380dfd8d04b7f4ed3532;p=android-x86%2Fframeworks-av.git Ignore all flush-complete notifications with port == 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. Change-Id: I76c0dfdcfc92a7c9acf57abf3027d2638d77efca --- diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp index 167071a390..d4d07b2815 100644 --- a/media/libstagefright/ACodec.cpp +++ b/media/libstagefright/ACodec.cpp @@ -1190,6 +1190,17 @@ bool ACodec::BaseState::onOMXMessage(const sp &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(event), static_cast(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(