OSDN Git Service

Don't overwrite pending port setting change if there are more than one port setting...
authorJames Dong <jdong@google.com>
Fri, 2 Sep 2011 02:31:01 +0000 (19:31 -0700)
committerJames Dong <jdong@google.com>
Fri, 2 Sep 2011 02:39:18 +0000 (19:39 -0700)
Change-Id: I3413f5235b191031252aa3785f5aaef00caef1ce
related-to-bug: 5122512

media/libstagefright/OMXCodec.cpp

index d5b013d..fb49d7b 100755 (executable)
@@ -2442,8 +2442,10 @@ void OMXCodec::onCmdComplete(OMX_COMMANDTYPE cmd, OMX_U32 data) {
                 // Don't notify clients if the output port settings change
                 // wasn't of importance to them, i.e. it may be that just the
                 // number of buffers has changed and nothing else.
-                mOutputPortSettingsHaveChanged =
-                    formatHasNotablyChanged(oldOutputFormat, mOutputFormat);
+                bool formatChanged = formatHasNotablyChanged(oldOutputFormat, mOutputFormat);
+                if (!mOutputPortSettingsHaveChanged) {
+                    mOutputPortSettingsHaveChanged = formatChanged;
+                }
 
                 enablePortAsync(portIndex);