From ed065aa6a884748077176da4bd3afbb430a2a162 Mon Sep 17 00:00:00 2001 From: cehoyos Date: Thu, 30 Sep 2010 09:08:37 +0000 Subject: subreader.c: Simplify comparison MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Clément Bœsch, ubitux gmail git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32416 b3059339-0415-0410-9bf9-f77b7e298cf2 --- subreader.c | 3 +-- 1 file changed, 1 insertion(+), 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;} -- cgit v1.2.3