diff options
author | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-04-06 11:22:06 +0000 |
---|---|---|
committer | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-04-06 11:22:06 +0000 |
commit | a40bfaec255f1c0b66e744e4b6baab671c46530d (patch) | |
tree | 663902981e39ac729d2c4f2c29fe91534bceba94 | |
parent | 6a34e840e90855f31db2ed143d473e51975e1312 (diff) |
skip {...} parts in SAME subs, patch by Salvatore Falco
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12137 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | subreader.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/subreader.c b/subreader.c index e32e4956f7..e245de86b5 100644 --- a/subreader.c +++ b/subreader.c @@ -144,6 +144,7 @@ subtitle *sub_read_line_sami(FILE *fd, subtitle *current) { current->text[current->lines++] = strdup (text); s += 4; } + else if ((*s == '{') && !sub_no_text_pp) { state = 5; ++s; continue; } else if (*s == '<') { state = 4; } else if (!strncasecmp (s, " ", 6)) { *p++ = ' '; s += 6; } else if (*s == '\t') { *p++ = ' '; s++; } @@ -168,6 +169,10 @@ subtitle *sub_read_line_sami(FILE *fd, subtitle *current) { s = strchr (s, '>'); if (s) { s++; state = 3; continue; } break; + case 5: /* get rid of {...} text */ + if (*s == '}') state = 3; + ++s; + continue; } /* read next line */ |