diff options
Diffstat (limited to 'libass/ass_parse.c')
-rw-r--r-- | libass/ass_parse.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/libass/ass_parse.c b/libass/ass_parse.c index 47d22e6..afba8a7 100644 --- a/libass/ass_parse.c +++ b/libass/ass_parse.c @@ -772,16 +772,10 @@ char *parse_tag(ASS_Renderer *render_priv, char *p, char *end, double pwr) break; } } else if (tag("r")) { - char *style; if (nargs) { - char *start = args->start; - end = args->end; - style = malloc(end - start + 1); - strncpy(style, start, end - start); - style[end - start] = '\0'; + int len = args->end - args->start; reset_render_context(render_priv, - lookup_style_strict(render_priv->track, style)); - free(style); + lookup_style_strict(render_priv->track, args->start, len)); } else reset_render_context(render_priv, NULL); } else if (tag("be")) { |