Mercurial > mplayer.hg
changeset 32421:12732436bc8a
More strict autodetection of RT subtitle format.
Patch by Clment Bsch [ubitux gmail com].
author | reimar |
---|---|
date | Sun, 17 Oct 2010 16:00:04 +0000 |
parents | feaa8f78ed3c |
children | 01115062cb22 |
files | subreader.c |
diffstat | 1 files changed, 1 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/subreader.c Sun Oct 17 15:56:04 2010 +0000 +++ b/subreader.c Sun Oct 17 16:00:04 2010 +0000 @@ -1129,13 +1129,8 @@ {*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))