From a40bfaec255f1c0b66e744e4b6baab671c46530d Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 6 Apr 2004 11:22:06 +0000 Subject: skip {...} parts in SAME subs, patch by Salvatore Falco git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12137 b3059339-0415-0410-9bf9-f77b7e298cf2 --- subreader.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'subreader.c') 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 */ -- cgit v1.2.3