[MPlayer-cvslog] r34573 - trunk/sub/subreader.c

reimar subversion at mplayerhq.hu
Sun Jan 15 12:18:14 CET 2012


Author: reimar
Date: Sun Jan 15 12:18:13 2012
New Revision: 34573

Log:
SSA reader: do not strip commas in commands.

Modified:
   trunk/sub/subreader.c

Modified: trunk/sub/subreader.c
==============================================================================
--- trunk/sub/subreader.c	Sun Jan 15 00:56:28 2012	(r34572)
+++ trunk/sub/subreader.c	Sun Jan 15 12:18:13 2012	(r34573)
@@ -652,6 +652,7 @@ static subtitle *sub_read_line_ssa(strea
 	     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 @@ static subtitle *sub_read_line_ssa(strea
 
         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;


More information about the MPlayer-cvslog mailing list