From: 11rcombs Date: Sat, 25 Jan 2014 23:48:24 +0000 (-0600) Subject: Parser: don't increment render_priv->state.bm_run_id (unnecessary) X-Git-Tag: 0.11.0~26 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c532300b58cb25211fedf8209f052b2a7dfb6f55;p=libass Parser: don't increment render_priv->state.bm_run_id (unnecessary) --- diff --git a/libass/ass_parse.c b/libass/ass_parse.c index fe40e69..fcf62c3 100644 --- a/libass/ass_parse.c +++ b/libass/ass_parse.c @@ -248,7 +248,6 @@ char *parse_tag(ASS_Renderer *render_priv, char *p, double pwr) } else val = render_priv->state.style->Outline; render_priv->state.border_x = val; - render_priv->state.bm_run_id++; } else if (mystrcmp(&p, "ybord")) { double val; if (mystrtod(&p, &val)) { @@ -257,7 +256,6 @@ char *parse_tag(ASS_Renderer *render_priv, char *p, double pwr) } else val = render_priv->state.style->Outline; render_priv->state.border_y = val; - render_priv->state.bm_run_id++; } else if (mystrcmp(&p, "xshad")) { double val; if (mystrtod(&p, &val)) @@ -265,7 +263,6 @@ char *parse_tag(ASS_Renderer *render_priv, char *p, double pwr) else val = render_priv->state.style->Shadow; render_priv->state.shadow_x = val; - render_priv->state.bm_run_id++; } else if (mystrcmp(&p, "yshad")) { double val; if (mystrtod(&p, &val)) @@ -273,7 +270,6 @@ char *parse_tag(ASS_Renderer *render_priv, char *p, double pwr) else val = render_priv->state.style->Shadow; render_priv->state.shadow_y = val; - render_priv->state.bm_run_id++; } else if (mystrcmp(&p, "fax")) { double val; if (mystrtod(&p, &val)) @@ -324,7 +320,6 @@ char *parse_tag(ASS_Renderer *render_priv, char *p, double pwr) render_priv->state.blur = val; } else render_priv->state.blur = 0.0; - render_priv->state.bm_run_id++; // ASS standard tags } else if (mystrcmp(&p, "fsc")) { char tp = *p++; @@ -392,7 +387,6 @@ char *parse_tag(ASS_Renderer *render_priv, char *p, double pwr) xval = yval = render_priv->state.style->Outline; render_priv->state.border_x = xval; render_priv->state.border_y = yval; - render_priv->state.bm_run_id++; } else if (mystrcmp(&p, "move")) { double x1, x2, y1, y2; long long t1, t2, delta_t, t; @@ -496,7 +490,6 @@ char *parse_tag(ASS_Renderer *render_priv, char *p, double pwr) change_alpha(&render_priv->state.c[3], render_priv->state.style->BackColour, 1); } - render_priv->state.bm_run_id++; // FIXME: simplify } else if (mystrcmp(&p, "an")) { int val; @@ -683,7 +676,6 @@ char *parse_tag(ASS_Renderer *render_priv, char *p, double pwr) else change_color(&render_priv->state.c[0], render_priv->state.style->PrimaryColour, 1); - render_priv->state.bm_run_id++; } else if ((*p >= '1') && (*p <= '4') && (++p) && (mystrcmp(&p, "c") || mystrcmp(&p, "a"))) { char n = *(p - 2); @@ -715,11 +707,9 @@ char *parse_tag(ASS_Renderer *render_priv, char *p, double pwr) switch (cmd) { case 'c': change_color(render_priv->state.c + cidx, val, pwr); - render_priv->state.bm_run_id++; break; case 'a': change_alpha(render_priv->state.c + cidx, val >> 24, pwr); - render_priv->state.bm_run_id++; break; default: ass_msg(render_priv->library, MSGL_WARN, "Bad command: %c%c", @@ -748,7 +738,6 @@ char *parse_tag(ASS_Renderer *render_priv, char *p, double pwr) render_priv->state.be = val; } else render_priv->state.be = 0; - render_priv->state.bm_run_id++; } else if (mystrcmp(&p, "b")) { int val; if (!mystrtoi(&p, &val) || !(val == 0 || val == 1 || val >= 100)) @@ -800,7 +789,6 @@ char *parse_tag(ASS_Renderer *render_priv, char *p, double pwr) xval = yval = render_priv->state.style->Shadow; render_priv->state.shadow_x = xval; render_priv->state.shadow_y = yval; - render_priv->state.bm_run_id++; } else if (mystrcmp(&p, "s")) { int val; if (!mystrtoi(&p, &val) || !(val == 0 || val == 1)) @@ -809,7 +797,6 @@ char *parse_tag(ASS_Renderer *render_priv, char *p, double pwr) render_priv->state.flags |= DECO_STRIKETHROUGH; else render_priv->state.flags &= ~DECO_STRIKETHROUGH; - render_priv->state.bm_run_id++; } else if (mystrcmp(&p, "u")) { int val; if (!mystrtoi(&p, &val) || !(val == 0 || val == 1)) @@ -818,7 +805,6 @@ char *parse_tag(ASS_Renderer *render_priv, char *p, double pwr) render_priv->state.flags |= DECO_UNDERLINE; else render_priv->state.flags &= ~DECO_UNDERLINE; - render_priv->state.bm_run_id++; } else if (mystrcmp(&p, "pbo")) { double val; mystrtod(&p, &val); diff --git a/libass/ass_render.c b/libass/ass_render.c index 0f17404..c8e6255 100644 --- a/libass/ass_render.c +++ b/libass/ass_render.c @@ -1839,7 +1839,6 @@ ass_render_event(ASS_Renderer *render_priv, ASS_Event *event, info->frz = render_priv->state.frz; info->fax = render_priv->state.fax; info->fay = render_priv->state.fay; - info->bm_run_id = render_priv->state.bm_run_id; if (info->drawing) { drawing = render_priv->state.drawing =