libmix: correct the method calucalte timestamp for mpeg4 decode.

BZ: 3035

Some mpeg4 clips freeze when playbacking, the timestamp is calculated uncorrectly, and framework will keep waiting to render the next frame
according to the wrong timestamp. When sometimes calculating the timestamp for a new frame, nanosecond is take as the basic unit, actually it should be macrosecond.

Change nanosecond to macrosecond as the basic unit for calcuating timestamp

Change-Id: I5bf57793900e0f60ceb849338b7929992297ea9f
Signed-off-by: xli111 <>
diff --git a/mix_video/src/mixvideoformat_mp42.cpp b/mix_video/src/mixvideoformat_mp42.cpp
index b3b6e25..e8c5fd1 100644
--- a/mix_video/src/mixvideoformat_mp42.cpp
+++ b/mix_video/src/mixvideoformat_mp42.cpp
@@ -532,8 +532,8 @@
                     ts_inc = ts_inc % pic_params->vop_time_increment_resolution;
                     LOG_V("timestamp is incremented by %"UINT64_FORMAT" at %d resolution.\n",
                           ts_inc, pic_params->vop_time_increment_resolution);
-                    // convert to nano-second
-                    ts_inc = ts_inc * 1e9 / pic_params->vop_time_increment_resolution;
+                    // convert to macrosecond, timestamp takes microsecond as basic unit.
+                    ts_inc = ts_inc * 1e6 / pic_params->vop_time_increment_resolution;
                     LOG_V("timestamp of P frame in packed frame is updated from %"UINT64_FORMAT"  to %"UINT64_FORMAT".\n",
                           ts, ts + ts_inc);
                     ts += ts_inc;