fix random SEGV issue which is caused by wild pointer in libmix

When resolution changes, we should flush video video pipeline at
first, then free surface buffers.

Bug: 23160948

Change-Id: I84782d886d8a484c2131d0b3f529f82b9c6fd8c9
Signed-off-by: mahongpe <hongpeng.ma@intel.com>
diff --git a/videocodec/OMXVideoDecoderBase.cpp b/videocodec/OMXVideoDecoderBase.cpp
index 6270cea..975ac4c 100644
--- a/videocodec/OMXVideoDecoderBase.cpp
+++ b/videocodec/OMXVideoDecoderBase.cpp
@@ -734,9 +734,10 @@
         this->ports[INPORT_INDEX]->SetPortDefinition(&paramPortDefinitionInput, true);
         this->ports[OUTPORT_INDEX]->SetPortDefinition(&paramPortDefinitionOutput, true);
 
+        ProcessorFlush(INPORT_INDEX);
+
         mVideoDecoder->freeSurfaceBuffers();
 
-        ProcessorFlush(INPORT_INDEX);
         this->ports[OUTPORT_INDEX]->ReportPortSettingsChanged();
 
         mFormatChanged = false;