diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-12-29 21:04:45 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-12-29 21:04:45 +0000 |
commit | f8c9f533522b9d3d1f2ef0cea99ece2eff145e8e (patch) | |
tree | 8faa40a39ae4a07b8bccc9cb9a23555f75a58881 | |
parent | bde111ee2150ff2ad328af4c4e73046f74039cf9 (diff) | |
download | mpv-f8c9f533522b9d3d1f2ef0cea99ece2eff145e8e.tar.bz2 mpv-f8c9f533522b9d3d1f2ef0cea99ece2eff145e8e.tar.xz |
support for subviewer format using dots instead of commas:
00:00:27.000 --> 00:00:28.300
patch by Oskar Liljeblad <oskar@osk.mine.nu>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8644 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | subreader.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/subreader.c b/subreader.c index 2add84f7c8..ca25906eb1 100644 --- a/subreader.c +++ b/subreader.c @@ -244,7 +244,7 @@ subtitle *sub_read_line_subviewer(FILE *fd,subtitle *current) { while (!current->text[0]) { if (!fgets (line, LINE_LEN, fd)) return NULL; - if ((len=sscanf (line, "%d:%d:%d,%d --> %d:%d:%d,%d",&a1,&a2,&a3,&a4,&b1,&b2,&b3,&b4)) < 8) + if ((len=sscanf (line, "%d:%d:%d%[,.]%d --> %d:%d:%d%[,.]%d",&a1,&a2,&a3,&i,&a4,&b1,&b2,&b3,&i,&b4)) < 10) continue; current->start = a1*360000+a2*6000+a3*100+a4/10; current->end = b1*360000+b2*6000+b3*100+b4/10; @@ -854,7 +854,7 @@ int sub_autodetect (FILE *fd) { {sub_uses_time=0;return SUB_MICRODVD;} if (sscanf (line, "%d:%d:%d.%d,%d:%d:%d.%d", &i, &i, &i, &i, &i, &i, &i, &i)==8) {sub_uses_time=1;return SUB_SUBRIP;} - if (sscanf (line, "%d:%d:%d,%d --> %d:%d:%d,%d", &i, &i, &i, &i, &i, &i, &i, &i)==8) + if (sscanf (line, "%d:%d:%d%[,.]%d --> %d:%d:%d%[,.]%d", &i, &i, &i, &i, &i, &i, &i, &i, &i, &i)==10) {sub_uses_time=1;return SUB_SUBVIEWER;} if (sscanf (line, "{T %d:%d:%d:%d",&i, &i, &i, &i)) {sub_uses_time=1;return SUB_SUBVIEWER2;} |