summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/ACodec.cpp
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2011-07-01 13:13:02 -0700
committerAndreas Huber <andih@google.com>2011-07-01 13:13:02 -0700
commit0af941927ef8f35f2da5380dfd8d04b7f4ed3532 (patch)
treefa356aacae6ff837c97f8544c89a02fcbfe16a38 /media/libstagefright/ACodec.cpp
parentcebcdaef5b559f4db2a9d8b305d9d7da03525b62 (diff)
downloadframeworks_av-0af941927ef8f35f2da5380dfd8d04b7f4ed3532.zip
frameworks_av-0af941927ef8f35f2da5380dfd8d04b7f4ed3532.tar.gz
frameworks_av-0af941927ef8f35f2da5380dfd8d04b7f4ed3532.tar.bz2
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
Diffstat (limited to 'media/libstagefright/ACodec.cpp')
-rw-r--r--media/libstagefright/ACodec.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index 167071a..d4d07b2 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(