From a007e8229fb2be4866c483f9cd6c4af238a2da5e Mon Sep 17 00:00:00 2001 From: James Dong Date: Mon, 4 Oct 2010 16:41:53 -0700 Subject: Fixed an issue where the reserved free space in the file writer was larger than intended The problem was that even though user does not explicitly request the max file size limit via MediaRecorder.setMaxFileSize(), the file writer sets an implicit file size limit if 32-bit file offset is used on user's behalf. The reserved free space is estimated based on the file size, if the file size limit is set by the user. The fix is to add an extra bool to tell the difference between an explit requested file size and an implicit file limit and use that to set the estimated moov box size accordingly. Change-Id: I731aca6c7833aa764ed7b905edb77721577471b3 --- include/media/stagefright/MPEG4Writer.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/media/stagefright/MPEG4Writer.h b/include/media/stagefright/MPEG4Writer.h index 70bd8e8..cff38b2 100644 --- a/include/media/stagefright/MPEG4Writer.h +++ b/include/media/stagefright/MPEG4Writer.h @@ -64,6 +64,7 @@ private: FILE *mFile; bool mUse4ByteNalLength; bool mUse32BitOffset; + bool mIsFileSizeLimitExplicitlyRequested; bool mPaused; bool mStarted; off_t mOffset; -- cgit v1.1