am 318a759e: Merge "Make sure that timestamp does not go backward in MP4 file writer" into gingerbread
Merge commit '318a759e3c24dd741f8959e2a433150ae88fb8d6' into gingerbread-plus-aosp * commit '318a759e3c24dd741f8959e2a433150ae88fb8d6': Make sure that timestamp does not go backward in MP4 file writer
This commit is contained in:
@@ -1569,9 +1569,9 @@ status_t MPEG4Writer::Track::threadEntry() {
|
|||||||
// The idea here is to avoid having two or more samples with the
|
// The idea here is to avoid having two or more samples with the
|
||||||
// same timestamp in the output file.
|
// same timestamp in the output file.
|
||||||
if (mTimeScale >= 1000000LL) {
|
if (mTimeScale >= 1000000LL) {
|
||||||
timestampUs += 1;
|
timestampUs = lastTimestampUs + 1;
|
||||||
} else {
|
} else {
|
||||||
timestampUs += (1000000LL + (mTimeScale >> 1)) / mTimeScale;
|
timestampUs = lastTimestampUs + (1000000LL + (mTimeScale >> 1)) / mTimeScale;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user