diff options
author | James Dong <jdong@google.com> | 2010-12-02 10:24:24 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-12-02 10:24:24 -0800 |
commit | f6882a9c8144dc0fd07f3434bb870e5251f51275 (patch) | |
tree | ce9c8a5f9de3fdc168a2fc70e85af81e130c9dde /media/libstagefright/MPEG4Writer.cpp | |
parent | 14072e56ef34f6ea4b517d69c13b61ad5ec67337 (diff) | |
parent | 5c2ccf1a4ff8465c076689b6c2d74f2cd4498df2 (diff) | |
download | frameworks_av-f6882a9c8144dc0fd07f3434bb870e5251f51275.zip frameworks_av-f6882a9c8144dc0fd07f3434bb870e5251f51275.tar.gz frameworks_av-f6882a9c8144dc0fd07f3434bb870e5251f51275.tar.bz2 |
am 80639875: am d4c5478a: Merge "Be conservative in estimating the file size limit." into gingerbread
* commit '806398755fdc63438b607856574e5b885ad98e6b':
Be conservative in estimating the file size limit.
Diffstat (limited to 'media/libstagefright/MPEG4Writer.cpp')
-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 6760707..602aa9f 100644 --- a/media/libstagefright/MPEG4Writer.cpp +++ b/media/libstagefright/MPEG4Writer.cpp @@ -878,7 +878,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() { |