summaryrefslogtreecommitdiffstats
path: root/sub
diff options
context:
space:
mode:
authormplayer-svn <svn@mplayerhq.hu>2012-01-15 11:18:13 +0000
committerwm4 <wm4@nowhere>2012-08-03 01:43:03 +0200
commitd5b964852a144bb3bda49d5ed678a8f0978c9f24 (patch)
tree6035c63aa972e9be4f7e968b1ec340d72ebf43ab /sub
parent2e127903246f5b41557cfe6df9e96d0394a53df2 (diff)
downloadmpv-d5b964852a144bb3bda49d5ed678a8f0978c9f24.tar.bz2
mpv-d5b964852a144bb3bda49d5ed678a8f0978c9f24.tar.xz
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
Diffstat (limited to 'sub')
-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;