summaryrefslogtreecommitdiffstats
path: root/contrib/patch-x264-idr.patch
diff options
context:
space:
mode:
authoreddyg <[email protected]>2007-09-17 03:01:07 +0000
committereddyg <[email protected]>2007-09-17 03:01:07 +0000
commit7b0444d5945ab264fa3b7086dd44a3c6ae383ee4 (patch)
treea02302e038fe02d941319d421ce7217a2aed5824 /contrib/patch-x264-idr.patch
parentb67ea5e9820f3ed2e969da3ae94205e4097c5da6 (diff)
Van's changes to the x264 lib and HB encoder to ensure that an IDR frame is used for each new chapter. Well done and lots of thanks to Van for this one.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@967 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'contrib/patch-x264-idr.patch')
-rw-r--r--contrib/patch-x264-idr.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/contrib/patch-x264-idr.patch b/contrib/patch-x264-idr.patch
new file mode 100644
index 000000000..df4294f12
--- /dev/null
+++ b/contrib/patch-x264-idr.patch
@@ -0,0 +1,17 @@
+Index: encoder/slicetype.c
+===================================================================
+--- encoder/slicetype.c (revision 665)
++++ encoder/slicetype.c (working copy)
+@@ -379,7 +379,12 @@
+ return;
+ frames[0] = h->frames.last_nonb;
+ for( j = 0; h->frames.next[j]; j++ )
++ {
++ // if the app wants an IDR, give it to them
++ if ( h->frames.next[j]->i_type == X264_TYPE_IDR )
++ return;
+ frames[j+1] = h->frames.next[j];
++ }
+ keyint_limit = h->param.i_keyint_max - frames[0]->i_frame + h->frames.i_last_idr - 1;
+ num_frames = X264_MIN( j, keyint_limit );
+ if( num_frames == 0 )