summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--media/libstagefright/MPEG4Writer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/media/libstagefright/MPEG4Writer.cpp b/media/libstagefright/MPEG4Writer.cpp
index e36d9fe..a15b84e 100644
--- a/media/libstagefright/MPEG4Writer.cpp
+++ b/media/libstagefright/MPEG4Writer.cpp
@@ -1569,9 +1569,9 @@ status_t MPEG4Writer::Track::threadEntry() {
// The idea here is to avoid having two or more samples with the
// same timestamp in the output file.
if (mTimeScale >= 1000000LL) {
- timestampUs += 1;
+ timestampUs = lastTimestampUs + 1;
} else {
- timestampUs += (1000000LL + (mTimeScale >> 1)) / mTimeScale;
+ timestampUs = lastTimestampUs + (1000000LL + (mTimeScale >> 1)) / mTimeScale;
}
#endif
}