diff options
-rw-r--r-- | libhb/deccc608sub.c | 8 | ||||
-rw-r--r-- | libhb/rendersub.c | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/libhb/deccc608sub.c b/libhb/deccc608sub.c index 77c677359..dacb064ee 100644 --- a/libhb/deccc608sub.c +++ b/libhb/deccc608sub.c @@ -880,7 +880,7 @@ static int write_cc_buffer_as_ssa(struct eia608_screen *data, // then width of screen is 42 columns (see CEA-708) screen_columns = 42; } - font_size = cropped_height * .066; + font_size = wb->height * .8 * .066; safe_x = 0.1 * wb->width; safe_y = 0.1 * wb->height; @@ -910,7 +910,7 @@ static int write_cc_buffer_as_ssa(struct eia608_screen *data, x = cropped_width - columns * cell_width - min_safe_x; if (x < min_safe_x) x = min_safe_x; - pos = hb_strdup_printf("{\\a1\\pos(%d,%d)}", x, y); + pos = hb_strdup_printf("{\\an1\\pos(%d,%d)}", x, y); int line = 1; for (i = 0; i < 15; i++) @@ -1808,9 +1808,9 @@ static int decccInit( hb_work_object_t * w, hb_job_t * job ) // Generate generic SSA Script Info. int height = job->title->geometry.height - job->crop[0] - job->crop[1]; int width = job->title->geometry.width - job->crop[2] - job->crop[3]; - int safe_height = 0.8 * height; + int safe_height = 0.8 * job->title->geometry.height; hb_subtitle_add_ssa_header(w->subtitle, "Courier New", - .08 * safe_height, width, height); + .066 * safe_height, width, height); } // When rendering subs, we need to push rollup subtitles out // asap (instead of waiting for a completed line) so that we diff --git a/libhb/rendersub.c b/libhb/rendersub.c index 1ea4c7648..6c1a6339b 100644 --- a/libhb/rendersub.c +++ b/libhb/rendersub.c @@ -596,10 +596,10 @@ static int cc608sub_post_init( hb_filter_object_t * filter, hb_job_t * job ) // to have the header rewritten with the correct dimensions. int height = job->title->geometry.height - job->crop[0] - job->crop[1]; int width = job->title->geometry.width - job->crop[2] - job->crop[3]; - int safe_height = 0.8 * height; + int safe_height = 0.8 * job->title->geometry.height; // Use fixed widht font for CC hb_subtitle_add_ssa_header(filter->subtitle, "Courier New", - .08 * safe_height, width, height); + .066 * safe_height, width, height); return ssa_post_init(filter, job); } |