mirror of https://github.com/mpv-player/mpv
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:
parent
2e12790324
commit
d5b964852a
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue