changeset 34485:78e6943b7764

SSA reader: do not strip commas in commands.
author reimar
date Sun, 15 Jan 2012 11:18:13 +0000
parents 03f47c7f6481
children 6e2b26c5d6de
files sub/subreader.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/sub/subreader.c	Sat Jan 14 23:56:28 2012 +0000
+++ b/sub/subreader.c	Sun Jan 15 11:18:13 2012 +0000
@@ -652,6 +652,7 @@
 	     line3[LINE_LEN+1],
 	     *line2;
 	char *tmp;
+	const char *brace;
 
 	do {
 		if (!stream_read_line (st, line, LINE_LEN, utf16)) return NULL;
@@ -669,11 +670,13 @@
 
         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;