diff options
author | James Dong <jdong@google.com> | 2010-12-02 10:21:06 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-12-02 10:21:06 -0800 |
commit | 5c2ccf1a4ff8465c076689b6c2d74f2cd4498df2 (patch) | |
tree | 20d8c331751e715721ae9562d7302924d94cf0eb /media/libstagefright | |
parent | aecdb70affacb10cde3e7fc22f30fc9fbf631fce (diff) | |
parent | d28b0e7057ea1b85d70f6aa25415655eb67ca126 (diff) | |
download | frameworks_av-5c2ccf1a4ff8465c076689b6c2d74f2cd4498df2.zip frameworks_av-5c2ccf1a4ff8465c076689b6c2d74f2cd4498df2.tar.gz frameworks_av-5c2ccf1a4ff8465c076689b6c2d74f2cd4498df2.tar.bz2 |
am d4c5478a: Merge "Be conservative in estimating the file size limit." into gingerbread
* commit 'd4c5478a8664f64ff66db9ae25250afac78b7a74':
Be conservative in estimating the file size limit.
Diffstat (limited to 'media/libstagefright')
-rw-r--r-- | media/libstagefright/MPEG4Writer.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/media/libstagefright/MPEG4Writer.cpp b/media/libstagefright/MPEG4Writer.cpp index cbb1604..7eb7d46 100644 --- a/media/libstagefright/MPEG4Writer.cpp +++ b/media/libstagefright/MPEG4Writer.cpp @@ -863,7 +863,10 @@ bool MPEG4Writer::exceedsFileSizeLimit() { nTotalBytesEstimate += (*it)->getEstimatedTrackSizeBytes(); } - return (nTotalBytesEstimate >= mMaxFileSizeLimitBytes); + // Be conservative in the estimate: do not exceed 95% of + // the target file limit. For small target file size limit, though, + // this will not help. + return (nTotalBytesEstimate >= (95 * mMaxFileSizeLimitBytes) / 100); } bool MPEG4Writer::exceedsFileDurationLimit() { |