libmix: reset mSignalBufferSize and mSignalBufferPre array in terminateVA

BZ: 134837

reset mSignalBufferSize and mSignalBufferPre array in terminateVA to fix the error in cts mediaCodec test
in the test case, the mediacodec call mediaCodec.stop then mediaCodec.start to restart a component
without distructure the component

Change-Id: Iea966dbb422c34a09996f347a2b55933e8ca5825
Signed-off-by: ywan171 <yi.a.wang@intel.com>
Reviewed-on: http://android.intel.com:8080/130319
Reviewed-by: Zhou, ChuX <chux.zhou@intel.com>
Reviewed-by: Feng, Wei <wei.feng@intel.com>
Reviewed-by: Liang, Dan <dan.liang@intel.com>
Reviewed-by: Shi, PingX <pingx.shi@intel.com>
Tested-by: Shi, PingX <pingx.shi@intel.com>
Reviewed-by: cactus <cactus@intel.com>
Tested-by: cactus <cactus@intel.com>
diff --git a/videodecoder/VideoDecoderBase.cpp b/videodecoder/VideoDecoderBase.cpp
index c12ea5d..a050f7b 100755
--- a/videodecoder/VideoDecoderBase.cpp
+++ b/videodecoder/VideoDecoderBase.cpp
@@ -142,7 +142,6 @@
     }
     mLowDelay = buffer->flag & WANT_LOW_DELAY;
     mRawOutput = buffer->flag & WANT_RAW_OUTPUT;
-    mSignalBufferSize = 0;
     if (mRawOutput) {
         WTRACE("Output is raw data.");
     }
@@ -167,7 +166,6 @@
     mNumSurfaces = 0;
     mSurfaceAcquirePos = 0;
     mNextOutputPOC = MINIMUM_POC;
-
     mVideoFormatInfo.valid = false;
     if (mParserHandle){
         vbp_close(mParserHandle);
@@ -949,6 +947,10 @@
 
     mVAStarted = false;
     mInitialized = false;
+    mSignalBufferSize = 0;
+    for (int i = 0; i < MAX_GRAPHIC_BUFFER_NUM; i++) {
+         mSignalBufferPre[i] = NULL;
+    }
     return DECODE_SUCCESS;
 }