summaryrefslogtreecommitdiffstats
path: root/media/libstagefright
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2010-08-26 09:47:12 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-08-26 09:47:12 -0700
commit318a759e3c24dd741f8959e2a433150ae88fb8d6 (patch)
tree02fd2dd6b8639136a197b887fd8b9759e5f03ded /media/libstagefright
parent913a8925c07e854a80bf5df87561f290d3a56d61 (diff)
parent05e80b4c1c52a6dc1f305e26ce67162256d6bcc5 (diff)
downloadframeworks_base-318a759e3c24dd741f8959e2a433150ae88fb8d6.zip
frameworks_base-318a759e3c24dd741f8959e2a433150ae88fb8d6.tar.gz
frameworks_base-318a759e3c24dd741f8959e2a433150ae88fb8d6.tar.bz2
Merge "Make sure that timestamp does not go backward in MP4 file writer" into gingerbread
Diffstat (limited to 'media/libstagefright')
-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
}