summaryrefslogtreecommitdiffstats
path: root/subreader.c
diff options
context:
space:
mode:
authorhenry <henry@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-07-20 15:29:40 +0000
committerhenry <henry@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-07-20 15:29:40 +0000
commita50a1eab17c2f73ff1806b217facd5b620be073e (patch)
tree5bb01de5642f8e197c31413fd38397b42737a9cf /subreader.c
parentbaadf00186b421c233fae7ba64925b327ce58b46 (diff)
downloadmpv-a50a1eab17c2f73ff1806b217facd5b620be073e.tar.bz2
mpv-a50a1eab17c2f73ff1806b217facd5b620be073e.tar.xz
ASS support
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10451 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'subreader.c')
-rw-r--r--subreader.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/subreader.c b/subreader.c
index 91dc561529..3e462d7a97 100644
--- a/subreader.c
+++ b/subreader.c
@@ -453,7 +453,13 @@ subtitle *sub_read_line_ssa(FILE *fd,subtitle *current) {
"%[^\n\r]", &nothing,
&hour1, &min1, &sec1, &hunsec1,
&hour2, &min2, &sec2, &hunsec2,
- line3) < 9);
+ line3) < 9
+ &&
+ sscanf (line, "Dialogue: %d,%d:%d:%d.%d,%d:%d:%d.%d,"
+ "%[^\n\r]", &nothing,
+ &hour1, &min1, &sec1, &hunsec1,
+ &hour2, &min2, &sec2, &hunsec2,
+ line3) < 9 );
line2=strchr(line3, ',');
@@ -904,6 +910,8 @@ int sub_autodetect (FILE *fd, int *uses_time) {
if (!memcmp(line, "Dialogue: Marked", 16))
{*uses_time=1; return SUB_SSA;}
+ if (!memcmp(line, "Dialogue: ", 10))
+ {*uses_time=1; return SUB_SSA;}
if (sscanf (line, "%d,%d,\"%c", &i, &i, (char *) &i) == 3)
{*uses_time=0;return SUB_DUNNOWHAT;}
if (sscanf (line, "FORMAT=%d", &i) == 1)
@@ -1605,7 +1613,7 @@ char** sub_filenames(char* path, char *fname)
char *tmp_fname_noext, *tmp_fname_trim, *tmp_fname_ext, *tmpresult;
int len, pos, found, i, j;
- char * sub_exts[] = { "utf", "utf8", "utf-8", "sub", "srt", "smi", "rt", "txt", "ssa", "aqt", "jss", NULL};
+ char * sub_exts[] = { "utf", "utf8", "utf-8", "sub", "srt", "smi", "rt", "txt", "ssa", "aqt", "jss", "ass", NULL};
subfn *result;
char **result2;