From d5b964852a144bb3bda49d5ed678a8f0978c9f24 Mon Sep 17 00:00:00 2001 From: mplayer-svn Date: Sun, 15 Jan 2012 11:18:13 +0000 Subject: subreader: SSA reader: do not strip commas in commands git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34573 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar --- sub/subreader.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sub') diff --git a/sub/subreader.c b/sub/subreader.c index 275c8abba9..bd1e9e01d1 100644 --- a/sub/subreader.c +++ b/sub/subreader.c @@ -645,6 +645,7 @@ static subtitle *sub_read_line_ssa(stream_t *st,subtitle *current, line3[LINE_LEN+1], *line2; char *tmp; + const char *brace; do { if (!stream_read_line (st, line, LINE_LEN, utf16)) return NULL; @@ -662,11 +663,13 @@ static subtitle *sub_read_line_ssa(stream_t *st,subtitle *current, line2=strchr(line3, ','); if (!line2) return NULL; + brace = strchr(line2, '{'); for (comma = 4; comma < max_comma; comma ++) { tmp = line2; if(!(tmp=strchr(++tmp, ','))) break; + if(brace && brace < tmp) break; // comma inside command if(*(++tmp) == ' ') break; /* a space after a comma means we're already in a sentence */ line2 = tmp; -- cgit v1.2.3