mirror of
https://github.com/mpv-player/mpv
synced 2025-03-04 21:27:58 +00:00
skip {...} parts in SAME subs, patch by Salvatore Falco
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12137 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
6a34e840e9
commit
a40bfaec25
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user