OSDN Git Service

Some (most) OMX decoders do not send a OMX_CmdComplete/Flush OMX_ALL notification
authorAndreas Huber <andih@google.com>
Thu, 30 Jun 2011 16:17:57 +0000 (09:17 -0700)
committerAndreas Huber <andih@google.com>
Thu, 30 Jun 2011 16:34:25 +0000 (09:34 -0700)
Change-Id: I1bdcc7be5f12dab301891a5f9ee5cc981e09ba82

media/libstagefright/ACodec.cpp

index 513eda8..167071a 100644 (file)
@@ -2282,6 +2282,11 @@ bool ACodec::FlushingState::onOMXEvent(
             if (data2 == kPortIndexInput || data2 == kPortIndexOutput) {
                 CHECK(!mFlushComplete[data2]);
                 mFlushComplete[data2] = true;
+
+                if (mFlushComplete[kPortIndexInput]
+                        && mFlushComplete[kPortIndexOutput]) {
+                    changeStateIfWeOwnAllBuffers();
+                }
             } else {
                 CHECK_EQ(data2, OMX_ALL);
                 CHECK(mFlushComplete[kPortIndexInput]);