diff options
author | James Dong <jdong@google.com> | 2010-08-26 09:47:12 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-08-26 09:47:12 -0700 |
commit | 640a72ecf2feb1ee5152d70234ff48d3be0e5ddf (patch) | |
tree | b38732e2434c84906cb9b56fa040496feda1cc7f /media | |
parent | f30274368327563021fb20faeb67b5661a0f373c (diff) | |
parent | 40e9940fadf22daa64c1e766fa8a855c7b149c17 (diff) | |
download | frameworks_av-640a72ecf2feb1ee5152d70234ff48d3be0e5ddf.zip frameworks_av-640a72ecf2feb1ee5152d70234ff48d3be0e5ddf.tar.gz frameworks_av-640a72ecf2feb1ee5152d70234ff48d3be0e5ddf.tar.bz2 |
Merge "Make sure that timestamp does not go backward in MP4 file writer" into gingerbread
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/MPEG4Writer.cpp | 4 |
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 } |