From 9f35fa95ab974c3ca5f0295b8d9094e5dffef285 Mon Sep 17 00:00:00 2001 From: Oneric Date: Fri, 10 Jul 2020 01:56:52 +0200 Subject: Ignore leading space of lines in parsing This more forgiving behaviour resembles VSFilter's more closely and will fix #117 ; trailing whitespace should not be an issue. Though as pointed out in #19 VSFilter is still far more lenient. --- libass/ass.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libass') diff --git a/libass/ass.c b/libass/ass.c index c7d5ea2..b5ebad6 100644 --- a/libass/ass.c +++ b/libass/ass.c @@ -940,6 +940,7 @@ static int process_fonts_line(ASS_Track *track, char *str) */ static int process_line(ASS_Track *track, char *str) { + skip_spaces(&str); if (!ass_strncasecmp(str, "[Script Info]", 13)) { track->parser_priv->state = PST_INFO; } else if (!ass_strncasecmp(str, "[V4 Styles]", 11)) { -- cgit v1.2.3