diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-10-17 16:00:04 +0000 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-11-02 04:18:37 +0200 |
commit | f733870f3212e8513ed0dea2b9b4f26b59de5f24 (patch) | |
tree | 86ee39f5b3c412b1aac39f7959e074b1c5e984cc /subreader.c | |
parent | dbd5feedd5f88a69b47b3bdaf0086329805d3c56 (diff) | |
download | mpv-f733870f3212e8513ed0dea2b9b4f26b59de5f24.tar.bz2 mpv-f733870f3212e8513ed0dea2b9b4f26b59de5f24.tar.xz |
subreader: More strict autodetection of RT subtitle format
Patch by Clément Bœsch [ubitux gmail com].
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32507 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'subreader.c')
-rw-r--r-- | subreader.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/subreader.c b/subreader.c index dcadc3083e..0db3198ca6 100644 --- a/subreader.c +++ b/subreader.c @@ -1057,13 +1057,8 @@ static int sub_autodetect (stream_t* st, int *uses_time, int utf16) { {*uses_time=1;return SUB_VPLAYER;} if (sscanf (line, "%d:%d:%d ", &i, &i, &i )==3) {*uses_time=1;return SUB_VPLAYER;} - //TODO: just checking if first line of sub starts with "<" is WAY - // too weak test for RT - // Please someone who knows the format of RT... FIX IT!!! - // It may conflict with other sub formats in the future (actually it doesn't) - if ( *line == '<' ) + if (!strncasecmp(line, "<window", 7)) {*uses_time=1;return SUB_RT;} - if (!memcmp(line, "Dialogue: Marked", 16)) {*uses_time=1; return SUB_SSA;} if (!memcmp(line, "Dialogue: ", 10)) |