[libmix] Add one log for further bz40478 analysis

BZ: 45166

Add one log for further bz40478 analysis

Change-Id: I4ef85c5bc582248047b61fc02a01fb4ebc29ac26
Signed-off-by: Zhao Liang <leo.zhao@intel.com>
Signed-off-by: hding3 <haitao.ding@intel.com>
Reviewed-on: http://android.intel.com:8080/55364
Reviewed-by: Yuan, Shengquan <shengquan.yuan@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
diff --git a/test/mix_encoder.cpp b/test/mix_encoder.cpp
index a228b71..3198054 100644
--- a/test/mix_encoder.cpp
+++ b/test/mix_encoder.cpp
@@ -721,9 +721,13 @@
     fclose(file);
 
     VideoStatistics stat;
-    gVideoEncoder->getStatistics(&stat);
-    printf("\nVideoStatistics\n");
-    printf("Encoded %d frames, Skip %d frames, encode time: average( %d us), max( %d us/Frame %d), min( %d us/Frame %d)\n", stat.total_frames, stat.skipped_frames, stat.average_encode_time, stat.max_encode_time, stat.max_encode_frame, stat.min_encode_time, stat.min_encode_frame );
+    if (gVideoEncoder->getStatistics(&stat) == ENCODE_SUCCESS)
+    {
+        printf("\nVideoStatistics\n");
+        printf("Encoded %d frames, Skip %d frames, encode time: average( %d us), max( %d us/Frame %d), min( %d us/Frame %d)\n", \
+		stat.total_frames, stat.skipped_frames, stat.average_encode_time, stat.max_encode_time, stat.max_encode_frame, \
+		stat.min_encode_time, stat.min_encode_frame );
+    }
     if(gVideoEncoder) {
         releaseVideoEncoder(gVideoEncoder);
         gVideoEncoder = NULL;
diff --git a/videoencoder/VideoEncoderAVC.cpp b/videoencoder/VideoEncoderAVC.cpp
index 9930b99..8833548 100644
--- a/videoencoder/VideoEncoderAVC.cpp
+++ b/videoencoder/VideoEncoderAVC.cpp
@@ -298,6 +298,7 @@
 
     if (inBuffer[pos - 1] != 0x01 || zeroByteCount < 2) {
         LOG_E("The stream is not AnnexB format \n");
+        LOG_E("segment status is %x \n", status);
         return ENCODE_FAIL; //not AnnexB, we won't process it
     }