diff options
author | cehoyos <cehoyos@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-09-30 09:08:37 +0000 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-11-02 04:18:08 +0200 |
commit | ed065aa6a884748077176da4bd3afbb430a2a162 (patch) | |
tree | 6f0f66bd055b9c3ec6ee58acade47d128d68a24c /subreader.c | |
parent | 2b01fc067844d82524b2e6e9fde8e424687d85d3 (diff) | |
download | mpv-ed065aa6a884748077176da4bd3afbb430a2a162.tar.bz2 mpv-ed065aa6a884748077176da4bd3afbb430a2a162.tar.xz |
subreader.c: Simplify comparison
Patch by Clément Bœsch, ubitux gmail
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32416 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'subreader.c')
-rw-r--r-- | subreader.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/subreader.c b/subreader.c index 1f308cc659..5ac6c38abc 100644 --- a/subreader.c +++ b/subreader.c @@ -1029,7 +1029,6 @@ static subtitle *sub_read_line_jacosub(stream_t* st, subtitle * current, int utf static int sub_autodetect (stream_t* st, int *uses_time, int utf16) { char line[LINE_LEN+1]; int i,j=0; - char p; while (j < 100) { j++; @@ -1073,7 +1072,7 @@ static int sub_autodetect (stream_t* st, int *uses_time, int utf16) { {*uses_time=1;return SUB_PJS;} if (sscanf (line, "FORMAT=%d", &i) == 1) {*uses_time=0; return SUB_MPSUB;} - if (sscanf (line, "FORMAT=TIM%c", &p)==1 && p=='E') + if (!memcmp(line, "FORMAT=TIME", 11)) {*uses_time=1; return SUB_MPSUB;} if (strstr (line, "-->>")) {*uses_time=0; return SUB_AQTITLE;} |