summaryrefslogtreecommitdiffstats
path: root/contrib/mp4v2/A02-meaningful-4gb-warning.patch
diff options
context:
space:
mode:
authorRodeo <[email protected]>2012-02-25 00:43:11 +0000
committerRodeo <[email protected]>2012-02-25 00:43:11 +0000
commitfa5ab86ec56830fd97d640ff22b0810e7ee9d93d (patch)
treea5d2721a442fa1b3589d76bed36dca39ab9fff2f /contrib/mp4v2/A02-meaningful-4gb-warning.patch
parent7a44812e6c5559b411e684a099edfc3354cdbbe3 (diff)
Add a meaningful error message to the log when a 32-bit MP4 encode exceeds 4 GB in size.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4464 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'contrib/mp4v2/A02-meaningful-4gb-warning.patch')
-rw-r--r--contrib/mp4v2/A02-meaningful-4gb-warning.patch14
1 files changed, 14 insertions, 0 deletions
diff --git a/contrib/mp4v2/A02-meaningful-4gb-warning.patch b/contrib/mp4v2/A02-meaningful-4gb-warning.patch
new file mode 100644
index 000000000..987298bd5
--- /dev/null
+++ b/contrib/mp4v2/A02-meaningful-4gb-warning.patch
@@ -0,0 +1,14 @@
+diff -Naur mp4v2-trunk-r355/src/mp4atom.cpp mp4v2-trunk-r355/src/mp4atom.cpp
+--- mp4v2-trunk-r355/src/mp4atom.cpp 2012-02-21 19:40:03.000000000 +0100
++++ mp4v2-trunk-r355/src/mp4atom.cpp 2012-02-21 19:36:38.000000000 +0100
+@@ -543,6 +543,10 @@
+ m_pFile->SetPosition(m_start + 8);
+ m_pFile->WriteUInt64(m_size);
+ } else {
++ if (!(m_size <= (uint64_t)0xFFFFFFFF)) {
++ // Let the user know what the following assert is all about
++ fprintf(stderr, "MP4ERROR: File size exceeded 4 GB; output unplayable. Enable \"Large file size\" to fix it.\n");
++ }
+ ASSERT(m_size <= (uint64_t)0xFFFFFFFF);
+ m_pFile->SetPosition(m_start);
+ m_pFile->WriteUInt32(m_size);