summaryrefslogtreecommitdiffstats
path: root/sub/subreader.c
diff options
context:
space:
mode:
Diffstat (limited to 'sub/subreader.c')
-rw-r--r--sub/subreader.c3
1 files changed, 3 insertions, 0 deletions
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;