summaryrefslogtreecommitdiffstats
path: root/media/libstagefright
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2010-08-26 13:15:00 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-08-26 13:15:00 -0700
commit8c26c127b7b77953437a3c997f08178769dc6d45 (patch)
treef224832817c439abbdd4421487429c60d60cad47 /media/libstagefright
parent1e8dd5b4a76b699c4b53c2ff3b7573eb3163182e (diff)
parent9509a0ce7ec1b10305bb6bd5fbf0edcf5b4f7fe1 (diff)
downloadframeworks_base-8c26c127b7b77953437a3c997f08178769dc6d45.zip
frameworks_base-8c26c127b7b77953437a3c997f08178769dc6d45.tar.gz
frameworks_base-8c26c127b7b77953437a3c997f08178769dc6d45.tar.bz2
am 9509a0ce: am 318a759e: Merge "Make sure that timestamp does not go backward in MP4 file writer" into gingerbread
Merge commit '9509a0ce7ec1b10305bb6bd5fbf0edcf5b4f7fe1' * commit '9509a0ce7ec1b10305bb6bd5fbf0edcf5b4f7fe1': Make sure that timestamp does not go backward in MP4 file writer
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
}