From 074659431ac452a25236eef920f3b9950ca57a52 Mon Sep 17 00:00:00 2001 From: titer Date: Thu, 30 Mar 2006 12:09:50 +0000 Subject: [PATCH] Patch FFmpeg to correctly report the profile and level in the avcC atom. Disable threaded H.264 encoding at level 13 for now, until I get why it makes QuickTime and iTunes crash. git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/avformat@59 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- contrib/patch-ffmpeg.patch | 37 +++++++++++++++++++++++++++++++------ libhb/encx264.c | 1 + 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/contrib/patch-ffmpeg.patch b/contrib/patch-ffmpeg.patch index 104ab276a..cd482bd17 100644 --- a/contrib/patch-ffmpeg.patch +++ b/contrib/patch-ffmpeg.patch @@ -1,6 +1,6 @@ diff -ru ffmpeg-20060326-bak/configure ffmpeg-20060326/configure ---- ffmpeg-20060326-bak/configure Wed Mar 29 16:49:54 2006 -+++ ffmpeg-20060326/configure Wed Mar 29 16:50:52 2006 +--- ffmpeg-20060326-bak/configure 2006-03-26 22:04:53.000000000 +0200 ++++ ffmpeg-20060326/configure 2006-03-30 13:29:36.000000000 +0200 @@ -272,7 +272,7 @@ 2.9-beos-991026*|2.9-beos-000224*) echo "R5/GG gcc" mmx="no" @@ -11,8 +11,8 @@ diff -ru ffmpeg-20060326-bak/configure ffmpeg-20060326/configure ;; esac diff -ru ffmpeg-20060326-bak/libavformat/movenc.c ffmpeg-20060326/libavformat/movenc.c ---- ffmpeg-20060326-bak/libavformat/movenc.c Wed Mar 29 16:50:12 2006 -+++ ffmpeg-20060326/libavformat/movenc.c Wed Mar 29 17:17:58 2006 +--- ffmpeg-20060326-bak/libavformat/movenc.c 2006-03-26 22:04:53.000000000 +0200 ++++ ffmpeg-20060326/libavformat/movenc.c 2006-03-30 13:31:03.000000000 +0200 @@ -22,6 +22,10 @@ #include "avio.h" #include "mov.h" @@ -24,9 +24,34 @@ diff -ru ffmpeg-20060326-bak/libavformat/movenc.c ffmpeg-20060326/libavformat/mo #undef NDEBUG #include +@@ -435,11 +439,6 @@ + end = track->vosData + track->vosLen; + + put_byte(pb, 1); /* version */ +- put_byte(pb, 77); /* profile */ +- put_byte(pb, 64); /* profile compat */ +- put_byte(pb, 30); /* level */ +- put_byte(pb, 0xff); /* 6 bits reserved (111111) + 2 bits nal size length - 1 (11) */ +- put_byte(pb, 0xe1); /* 3 bits reserved (111) + 5 bits number of sps (00001) */ + + /* look for sps and pps */ + while (buf < end) { +@@ -458,6 +457,12 @@ + } + assert(sps); + assert(pps); ++ ++ put_byte(pb, sps[1]); /* profile */ ++ put_byte(pb, sps[2]); /* profile compat */ ++ put_byte(pb, sps[3]); /* level */ ++ put_byte(pb, 0xff); /* 6 bits reserved (111111) + 2 bits nal size length - 1 (11) */ ++ put_byte(pb, 0xe1); /* 3 bits reserved (111) + 5 bits number of sps (00001) */ + put_be16(pb, sps_size); + put_buffer(pb, sps, sps_size); + put_byte(pb, 1); /* number of pps */ diff -ru ffmpeg-20060326-bak/libavformat/tcp.c ffmpeg-20060326/libavformat/tcp.c ---- ffmpeg-20060326-bak/libavformat/tcp.c Wed Mar 29 16:50:14 2006 -+++ ffmpeg-20060326/libavformat/tcp.c Wed Mar 29 17:33:57 2006 +--- ffmpeg-20060326-bak/libavformat/tcp.c 2006-03-26 22:04:53.000000000 +0200 ++++ ffmpeg-20060326/libavformat/tcp.c 2006-03-30 13:29:36.000000000 +0200 @@ -112,11 +112,13 @@ break; } diff --git a/libhb/encx264.c b/libhb/encx264.c index e0a2c5fc6..13faadc39 100644 --- a/libhb/encx264.c +++ b/libhb/encx264.c @@ -64,6 +64,7 @@ int encx264Init( hb_work_object_t * w, hb_job_t * job ) param.i_log_level = X264_LOG_NONE; if( job->h264_13 ) { + param.i_threads = 1; param.b_cabac = 0; param.i_level_idc = 13; } -- 2.40.0