mirror of https://github.com/mpv-player/mpv
ssa worx fine. Testers needed :)))
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2141 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
031c6bf512
commit
a86edc5af9
18
subreader.c
18
subreader.c
|
@ -307,15 +307,21 @@ subtitle *sub_read_line_ssa(FILE *fd,subtitle *current) {
|
||||||
hour2, min2, sec2, hunsec2, nothing;
|
hour2, min2, sec2, hunsec2, nothing;
|
||||||
|
|
||||||
char line[1000],
|
char line[1000],
|
||||||
line2[1000];
|
line3[1000],
|
||||||
|
*line2;
|
||||||
do {
|
do {
|
||||||
if (!fgets (line, 1000, fd)) return NULL;
|
if (!fgets (line, 1000, fd)) return NULL;
|
||||||
} while (sscanf (line, "Dialogue: Marked=%d,%d:%d:%d.%d,%d:%d:%d.%d,"
|
} while (sscanf (line, "Dialogue: Marked=%d,%d:%d:%d.%d,%d:%d:%d.%d,"
|
||||||
"*Default,%d,%d,%d,%d,,%[^\n\r]", ¬hing, &hour1, &min1,
|
"%[^\n\r]", ¬hing,
|
||||||
&sec1, &hunsec1,
|
&hour1, &min1, &sec1, &hunsec1,
|
||||||
&hour2, &min2, &sec2, &hunsec2, ¬hing,
|
&hour2, &min2, &sec2, &hunsec2,
|
||||||
¬hing, ¬hing, ¬hing, line2) < 14);
|
line3) < 9);
|
||||||
current->lines=1;
|
line2=strstr(line3,",,");
|
||||||
|
if (!line2) return NULL;
|
||||||
|
line2 ++;
|
||||||
|
line2 ++;
|
||||||
|
|
||||||
|
current->lines=1; // ez a kiraly!!!
|
||||||
current->start = 360000*hour1 + 6000*min1 + 100*sec1 + hunsec1;
|
current->start = 360000*hour1 + 6000*min1 + 100*sec1 + hunsec1;
|
||||||
current->end = 360000*hour2 + 6000*min2 + 100*sec2 + hunsec2;
|
current->end = 360000*hour2 + 6000*min2 + 100*sec2 + hunsec2;
|
||||||
current->text[0]=(char *) malloc(strlen(line2)+1);
|
current->text[0]=(char *) malloc(strlen(line2)+1);
|
||||||
|
|
Loading…
Reference in New Issue