From 764b4df68a5fde0a6ac524684b23ccf6057d6596 Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Tue, 28 Jul 2009 11:05:26 +0200 Subject: [PATCH] Fix \k and \ko tags The timing calculations for \k and \ko were off and still assumed int values for a bbox, while it now uses a d6 representation. This essentially made duration about 64 times as long as it should be. --- libass/ass_render.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libass/ass_render.c b/libass/ass_render.c index 418fceb..8c2a408 100644 --- a/libass/ass_render.c +++ b/libass/ass_render.c @@ -891,7 +891,7 @@ static ass_image_t *render_text(ass_renderer_t *render_priv, int dst_x, bm = info->bm_o; if ((info->effect_type == EF_KARAOKE_KO) - && (info->effect_timing <= info->bbox.xMax)) { + && (info->effect_timing <= d6_to_int(info->bbox.xMax))) { // do nothing } else { here_tail = tail; @@ -916,7 +916,7 @@ static ass_image_t *render_text(ass_renderer_t *render_priv, int dst_x, if ((info->effect_type == EF_KARAOKE) || (info->effect_type == EF_KARAOKE_KO)) { - if (info->effect_timing > info->bbox.xMax) + if (info->effect_timing > d6_to_int(info->bbox.xMax)) tail = render_glyph(render_priv, bm, pen_x, pen_y, info->c[0], 0, 1000000, tail); -- 2.40.0