From: Grigori Goronzy Date: Tue, 28 Jul 2009 09:05:26 +0000 (+0200) Subject: Fix \k and \ko tags X-Git-Tag: 0.9.7~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=764b4df68a5fde0a6ac524684b23ccf6057d6596;p=libass 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. --- 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);