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
This commit is contained in:
mplayer-svn 2012-01-15 11:18:13 +00:00 committed by wm4
parent 2e12790324
commit d5b964852a
1 changed files with 3 additions and 0 deletions

View File

@ -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;