OSDN Git Service

Patches mpeg4ip to write the compressor name correctly for h.264 (so it reads "AVC...
authorjbrjake <jbrjake@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Tue, 24 Jul 2007 16:14:47 +0000 (16:14 +0000)
committerjbrjake <jbrjake@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Tue, 24 Jul 2007 16:14:47 +0000 (16:14 +0000)
Credit goes to Yuvi and the rest of the Perian team (see ticket 226 on trac.perian.org ). Thanks!

git-svn-id: svn://localhost/HandBrake/trunk@725 b64f7644-9d1e-0410-96f1-a4d463321fa5

contrib/Jamfile
contrib/patch-mpeg4ip-pascal-str.patch [new file with mode: 0644]

index a1cd814..5b6c08e 100644 (file)
@@ -207,7 +207,7 @@ if $(OS) != CYGWIN
        {
        cd `dirname $(>)` && CONTRIB=`pwd` &&
        rm -rf mpeg4ip && tar xzf mpeg4ip.tar.gz && cd mpeg4ip &&
-       patch -p1 < ../patch-mpeg4ip.patch &&
+       patch -p1 < ../patch-mpeg4ip.patch && patch -p0 < ../patch-mpeg4ip-pascal-str.patch &&
        ./bootstrap  --disable-mp3lame --disable-faac --disable-x264 --disable-server --disable-player && make -C lib/mp4v2 libmp4v2.la &&
        cp lib/mp4v2/.libs/libmp4v2.a $CONTRIB/lib &&
        cp mpeg4ip_config.h include/mpeg4ip.h include/mpeg4ip_version.h \
@@ -222,7 +222,7 @@ else
        cd `dirname $(>)` && CONTRIB=`pwd` &&
        rm -rf mpeg4ip && tar xzf mpeg4ip.tar.gz && cd mpeg4ip &&
        patch -p1 < ../patch-mpeg4ip.patch &&
-       patch -p1 < ../patch_mpeg4ip_cygwin.patch && ./bootstrap && make -C lib/mp4v2 libmp4v2.la &&
+       patch -p1 < ../patch_mpeg4ip_cygwin.patch && patch -p0 < ../patch-mpeg4ip-pascal-str.patch && ./bootstrap && make -C lib/mp4v2 libmp4v2.la &&
        cp lib/mp4v2/.libs/libmp4v2.a $CONTRIB/lib &&
        cp mpeg4ip_config.h include/mpeg4ip.h include/mpeg4ip_version.h \
        include/mpeg4ip_win32.h lib/mp4v2/*.h $CONTRIB/include &&
diff --git a/contrib/patch-mpeg4ip-pascal-str.patch b/contrib/patch-mpeg4ip-pascal-str.patch
new file mode 100644 (file)
index 0000000..4add6de
--- /dev/null
@@ -0,0 +1,24 @@
+--- lib/mp4v2/atom_avc1.cpp.orig   2007-07-24 02:19:41.000000000 -0400
++++ lib/mp4v2/atom_avc1.cpp   2007-07-24 02:19:44.000000000 -0400
+@@ -41,6 +41,7 @@
+       MP4StringProperty* pProp =
+               new MP4StringProperty("compressorName");
+       pProp->SetFixedLength(32);
++      pProp->SetCountedFormat(true);
+       pProp->SetValue("AVC Coding");
+       AddProperty(pProp); /* 6 */
+
+--- lib/mp4v2/mp4property.cpp.orig   2007-07-24 02:20:32.000000000 -0400
++++ lib/mp4v2/mp4property.cpp   2007-07-24 02:21:52.000000000 -0400
+@@ -391,6 +391,10 @@
+       if (m_useCountedFormat) {
+               pFile->WriteCountedString(m_values[index],
+                       (m_useUnicode ? 2 : 1), m_useExpandedCount);
++      if (m_fixedLength) {
++              pFile->WriteBytes((u_int8_t*)m_values[index],
++                      m_fixedLength - strlen(m_values[index]) - 1);
++              }
+       } else if (m_fixedLength) {
+               pFile->WriteBytes((u_int8_t*)m_values[index], m_fixedLength);
+       } else {
+