From 06254850dc2c1ec43d57f4d8e2026fa67967d5b9 Mon Sep 17 00:00:00 2001 From: jstebbins Date: Sat, 5 May 2012 18:22:37 +0000 Subject: libhb: Fix problem with positions of burned-in subs When cropping and/or scaling, the position of burned-in SSA subs was broken. Also, when scaling, the position of all other burned-in subs was broken. Part of this fix is to revert a bit of filter initialization changes that were made in this commit https://trac.handbrake.fr/changeset/4605 The other part of the fix is to add cropping parameters to the initialization of the subtitle rendering filter. This filter needs the *original* title dimensions and the crop values in order to compute the positions properly. The changes that I am reverting gave it the scaled job dimensions and the crop values. This was wrong in so many ways it's embarassing :p git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4642 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- macosx/Controller.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'macosx/Controller.m') diff --git a/macosx/Controller.m b/macosx/Controller.m index e3c85dffa..9d7830059 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -3252,7 +3252,9 @@ bool one_burned = FALSE; if( one_burned ) { filter = hb_filter_init( HB_FILTER_RENDER_SUB ); - hb_add_filter( job, filter, NULL ); + hb_add_filter( job, filter, [[NSString stringWithFormat:@"%d:%d:%d:%d", + job->crop[0], job->crop[1], + job->crop[2], job->crop[3]] UTF8String] ); } @@ -3790,7 +3792,9 @@ bool one_burned = FALSE; if( one_burned ) { filter = hb_filter_init( HB_FILTER_RENDER_SUB ); - hb_add_filter( job, filter, NULL ); + hb_add_filter( job, filter, [[NSString stringWithFormat:@"%d:%d:%d:%d", + job->crop[0], job->crop[1], + job->crop[2], job->crop[3]] UTF8String] ); } #pragma mark - -- cgit v1.2.3