summaryrefslogtreecommitdiffstats
path: root/libhb/work.c
diff options
context:
space:
mode:
authorRodeo <[email protected]>2013-04-24 19:56:47 +0000
committerRodeo <[email protected]>2013-04-24 19:56:47 +0000
commitd43e89ac4ed7039423db1662e63bebb4966cc152 (patch)
treeb97691820ca704cbcaa7f82fe89f7b54692a14a4 /libhb/work.c
parent4fdb72a84658bd4aa48b2a46a11f0935c23c76d3 (diff)
work: pass the crop settings to the subtitle renderer when adding it to the flter chain.
Fixes an issue where subtitles would not be re-positioned and be cut off. Fix by John Stebbins. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5410 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/work.c')
-rw-r--r--libhb/work.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/libhb/work.c b/libhb/work.c
index b508f0929..45d341e7d 100644
--- a/libhb/work.c
+++ b/libhb/work.c
@@ -665,17 +665,21 @@ static void do_job( hb_job_t * job )
* Note: out.track starts at 1, i starts at 0 */
subtitle->out_track = ++i;
}
- if ( one_burned )
+ if (one_burned)
{
- hb_filter_object_t * filter;
-
// Add subtitle rendering filter
// Note that if the filter is already in the filter chain, this
// has no effect. Note also that this means the front-end is
// not required to add the subtitle rendering filter since
// we will always try to do it here.
- filter = hb_filter_init(HB_FILTER_RENDER_SUB);
- hb_add_filter( job, filter, NULL );
+ hb_filter_object_t *filter = hb_filter_init(HB_FILTER_RENDER_SUB);
+ char *filter_settings = hb_strdup_printf("%d:%d:%d:%d",
+ job->crop[0],
+ job->crop[1],
+ job->crop[2],
+ job->crop[3]);
+ hb_add_filter(job, filter, filter_settings);
+ free(filter_settings);
}
}